Skip to content

Instantly share code, notes, and snippets.

@compil3
Created May 11, 2020 20:21
Show Gist options
  • Save compil3/0764bc9f4f33914a686a3086e21de343 to your computer and use it in GitHub Desktop.
Save compil3/0764bc9f4f33914a686a3086e21de343 to your computer and use it in GitHub Desktop.
foreach
foreach (var careerStats in findCareerNode)
{
if (WebUtility.HtmlDecode(careerStats
.SelectSingleNode($"//*[@id='lg_team_user_leagues-{leagueId}']/div[{div}]/table/tbody/tr[{index}]/td[1]").InnerText).Trim() != seasonId)
{
index++;
continue;
}else if (WebUtility.HtmlDecode(careerStats
.SelectSingleNode(
$"//*[@id='lg_team_user_leagues-{leagueId}']/div[{div}]/table/tbody/tr[{index}]/td[2]")
.InnerText).Trim() != "Reg")
{
index++;
continue;
}
var type = WebUtility.HtmlDecode(careerStats
.SelectSingleNode(
$"//*[@id='lg_team_user_leagues-{leagueId}']/div[{div}]/table/tbody/tr[{index}]/td[2]")
.InnerText);
var record = WebUtility.HtmlDecode(careerStats
.SelectSingleNode(
$"//*[@id='lg_team_user_leagues-{leagueId}']/div[{div}]/table/tbody/tr[{index}]/td[3]")
.InnerText);
var amr = WebUtility.HtmlDecode(careerStats
.SelectSingleNode(
$"//*[@id='lg_team_user_leagues-{leagueId}']/div[{div}]/table/tbody/tr[{index}]/td[4]")
.InnerText) ?? "0.0";
var goals = WebUtility.HtmlDecode(careerStats
.SelectSingleNode(
$"//*[@id='lg_team_user_leagues-{leagueId}']/div[{div}]/table/tbody/tr[{index}]/td[5]")
.InnerText);
var assists = WebUtility.HtmlDecode(careerStats
.SelectSingleNode(
$"//*[@id='lg_team_user_leagues-{leagueId}']/div[{div}]/table/tbody/tr[{index}]/td[6]")
.InnerText);
var sot = WebUtility.HtmlDecode(careerStats
.SelectSingleNode(
$"//*[@id='lg_team_user_leagues-{leagueId}']/div[{div}]/table/tbody/tr[{index}]/td[7]")
.InnerText);
var shots = WebUtility.HtmlDecode(careerStats
.SelectSingleNode(
$"//*[@id='lg_team_user_leagues-{leagueId}']/div[{div}]/table/tbody/tr[{index}]/td[8]")
.InnerText);
var passC = WebUtility.HtmlDecode(careerStats
.SelectSingleNode(
$"//*[@id='lg_team_user_leagues-{leagueId}']/div[{div}]/table/tbody/tr[{index}]/td[9]")
.InnerText);
var passA = WebUtility.HtmlDecode(careerStats
.SelectSingleNode(
$"//*[@id='lg_team_user_leagues-{leagueId}']/div[{div}]/table/tbody/tr[{index}]/td[10]")
.InnerText);
var keypass = WebUtility.HtmlDecode(careerStats
.SelectSingleNode(
$"//*[@id='lg_team_user_leagues-{leagueId}']/div[{div}]/table/tbody/tr[{index}]/td[11]")
.InnerText);
var interceptions = WebUtility.HtmlDecode(careerStats
.SelectSingleNode(
$"//*[@id='lg_team_user_leagues-{leagueId}']/div[{div}]/table/tbody/tr[{index}]/td[12]")
.InnerText);
var tac = WebUtility.HtmlDecode(careerStats
.SelectSingleNode(
$"//*[@id='lg_team_user_leagues-{leagueId}']/div[{div}]/table/tbody/tr[{index}]/td[13]")
.InnerText);
var tacA = WebUtility.HtmlDecode(careerStats
.SelectSingleNode(
$"//*[@id='lg_team_user_leagues-{leagueId}']/div[{div}]/table/tbody/tr[{index}]/td[14]")
.InnerText);
var blk = WebUtility.HtmlDecode(careerStats
.SelectSingleNode(
$"//*[@id='lg_team_user_leagues-{leagueId}']/div[{div}]/table/tbody/tr[{index}]/td[15]")
.InnerText);
var rc = WebUtility.HtmlDecode(careerStats
.SelectSingleNode(
$"//*[@id='lg_team_user_leagues-{leagueId}']/div[{div}]/table/tbody/tr[{index}]/td[16]")
.InnerText);
var yc = WebUtility.HtmlDecode(careerStats
.SelectSingleNode(
$"//*[@id='lg_team_user_leagues-{leagueId}']/div[{div}]/table/tbody/tr[{index}]/td[17]")
.InnerText);
GC.Collect();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment