Skip to content

Commit

Permalink
Updated PlayerExtractor - Need to modify logic for finding the curren…
Browse files Browse the repository at this point in the history
…t club.
  • Loading branch information
MikeHook committed May 2, 2011
1 parent 4c50fe9 commit 34f7f85
Show file tree
Hide file tree
Showing 4 changed files with 1,415 additions and 1 deletion.
18 changes: 17 additions & 1 deletion CSharpApp/FootyLinks.Processes/PlayerExtractor.cs
Expand Up @@ -79,11 +79,27 @@ public string GetPlayerName()
return playerName;
}

public int GetCurrentClubId()
{
//TODO - extract the club ID from the link href, so this can be used to uniquely identify the club
throw new NotImplementedException();
}


public string GetCurrentClubName()
{
if (_playerClubs.Any() == false)
/*
var currentClubNode = _htmlDocument.DocumentNode.SelectSingleNode("//div[@class='midfielder bull']");
if (currentClubNode == null)
return null;
var currentClubLinkNode = currentClubNode.SelectSingleNode("a");
if (currentClubLinkNode == null)
return null;
return currentClubLinkNode.InnerText.Trim();
*/

PlayerClubDto mostRecentClub = _playerClubs
.SingleOrDefault(c => c.PlayerLeftDate.HasValue == false);

Expand Down
2 changes: 2 additions & 0 deletions ErrorLog/dbStats.txt
@@ -0,0 +1,2 @@
Players: 48771
Clubs: 2340
200 changes: 200 additions & 0 deletions ErrorLog/importErrorlog.txt
@@ -0,0 +1,200 @@
Source Reference: 10498
System.InvalidOperationException: Sequence contains more than one matching element
at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
at FootyLinks.Processes.PlayerExtractor.GetCurrentClubName() in C:\_Development\FootyLinks\CSharpApp\FootyLinks.Processes\PlayerExtractor.cs:line 87
at FootyLinks.DataImporter.Program.importPlayer(String sourceFilePath, Int32 sourceReference) in C:\_Development\FootyLinks\CSharpApp\FootyLinks.DataImporter\Program.cs:line 61
at FootyLinks.DataImporter.Program.Main(String[] args) in C:\_Development\FootyLinks\CSharpApp\FootyLinks.DataImporter\Program.cs:line 36


Source Reference: 10568
System.InvalidOperationException: Sequence contains more than one matching element
at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
at FootyLinks.Processes.PlayerExtractor.GetCurrentClubName() in C:\_Development\FootyLinks\CSharpApp\FootyLinks.Processes\PlayerExtractor.cs:line 87
at FootyLinks.DataImporter.Program.importPlayer(String sourceFilePath, Int32 sourceReference) in C:\_Development\FootyLinks\CSharpApp\FootyLinks.DataImporter\Program.cs:line 61
at FootyLinks.DataImporter.Program.Main(String[] args) in C:\_Development\FootyLinks\CSharpApp\FootyLinks.DataImporter\Program.cs:line 36


Source Reference: 10633
System.InvalidOperationException: Sequence contains more than one matching element
at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
at FootyLinks.Processes.PlayerExtractor.GetCurrentClubName() in C:\_Development\FootyLinks\CSharpApp\FootyLinks.Processes\PlayerExtractor.cs:line 87
at FootyLinks.DataImporter.Program.importPlayer(String sourceFilePath, Int32 sourceReference) in C:\_Development\FootyLinks\CSharpApp\FootyLinks.DataImporter\Program.cs:line 61
at FootyLinks.DataImporter.Program.Main(String[] args) in C:\_Development\FootyLinks\CSharpApp\FootyLinks.DataImporter\Program.cs:line 36


Source Reference: 10692
System.InvalidOperationException: Sequence contains more than one matching element
at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
at FootyLinks.Processes.PlayerExtractor.GetCurrentClubName() in C:\_Development\FootyLinks\CSharpApp\FootyLinks.Processes\PlayerExtractor.cs:line 87
at FootyLinks.DataImporter.Program.importPlayer(String sourceFilePath, Int32 sourceReference) in C:\_Development\FootyLinks\CSharpApp\FootyLinks.DataImporter\Program.cs:line 61
at FootyLinks.DataImporter.Program.Main(String[] args) in C:\_Development\FootyLinks\CSharpApp\FootyLinks.DataImporter\Program.cs:line 36


Source Reference: 10693
System.InvalidOperationException: Sequence contains more than one matching element
at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
at FootyLinks.Processes.PlayerExtractor.GetCurrentClubName() in C:\_Development\FootyLinks\CSharpApp\FootyLinks.Processes\PlayerExtractor.cs:line 87
at FootyLinks.DataImporter.Program.importPlayer(String sourceFilePath, Int32 sourceReference) in C:\_Development\FootyLinks\CSharpApp\FootyLinks.DataImporter\Program.cs:line 61
at FootyLinks.DataImporter.Program.Main(String[] args) in C:\_Development\FootyLinks\CSharpApp\FootyLinks.DataImporter\Program.cs:line 36


Source Reference: 10728
System.InvalidOperationException: Sequence contains more than one matching element
at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
at FootyLinks.Processes.PlayerExtractor.GetCurrentClubName() in C:\_Development\FootyLinks\CSharpApp\FootyLinks.Processes\PlayerExtractor.cs:line 87
at FootyLinks.DataImporter.Program.importPlayer(String sourceFilePath, Int32 sourceReference) in C:\_Development\FootyLinks\CSharpApp\FootyLinks.DataImporter\Program.cs:line 61
at FootyLinks.DataImporter.Program.Main(String[] args) in C:\_Development\FootyLinks\CSharpApp\FootyLinks.DataImporter\Program.cs:line 36


Source Reference: 10811
System.InvalidOperationException: Sequence contains more than one matching element
at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
at FootyLinks.Processes.PlayerExtractor.GetCurrentClubName() in C:\_Development\FootyLinks\CSharpApp\FootyLinks.Processes\PlayerExtractor.cs:line 87
at FootyLinks.DataImporter.Program.importPlayer(String sourceFilePath, Int32 sourceReference) in C:\_Development\FootyLinks\CSharpApp\FootyLinks.DataImporter\Program.cs:line 61
at FootyLinks.DataImporter.Program.Main(String[] args) in C:\_Development\FootyLinks\CSharpApp\FootyLinks.DataImporter\Program.cs:line 36


Source Reference: 10840
System.InvalidOperationException: Sequence contains more than one matching element
at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
at FootyLinks.Processes.PlayerExtractor.GetCurrentClubName() in C:\_Development\FootyLinks\CSharpApp\FootyLinks.Processes\PlayerExtractor.cs:line 87
at FootyLinks.DataImporter.Program.importPlayer(String sourceFilePath, Int32 sourceReference) in C:\_Development\FootyLinks\CSharpApp\FootyLinks.DataImporter\Program.cs:line 61
at FootyLinks.DataImporter.Program.Main(String[] args) in C:\_Development\FootyLinks\CSharpApp\FootyLinks.DataImporter\Program.cs:line 36


Source Reference: 10865
System.InvalidOperationException: Sequence contains more than one matching element
at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
at FootyLinks.Processes.PlayerExtractor.GetCurrentClubName() in C:\_Development\FootyLinks\CSharpApp\FootyLinks.Processes\PlayerExtractor.cs:line 87
at FootyLinks.DataImporter.Program.importPlayer(String sourceFilePath, Int32 sourceReference) in C:\_Development\FootyLinks\CSharpApp\FootyLinks.DataImporter\Program.cs:line 61
at FootyLinks.DataImporter.Program.Main(String[] args) in C:\_Development\FootyLinks\CSharpApp\FootyLinks.DataImporter\Program.cs:line 36


Source Reference: 11080
System.InvalidOperationException: Sequence contains more than one matching element
at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
at FootyLinks.Processes.PlayerExtractor.GetCurrentClubName() in C:\_Development\FootyLinks\CSharpApp\FootyLinks.Processes\PlayerExtractor.cs:line 87
at FootyLinks.DataImporter.Program.importPlayer(String sourceFilePath, Int32 sourceReference) in C:\_Development\FootyLinks\CSharpApp\FootyLinks.DataImporter\Program.cs:line 61
at FootyLinks.DataImporter.Program.Main(String[] args) in C:\_Development\FootyLinks\CSharpApp\FootyLinks.DataImporter\Program.cs:line 36


Source Reference: 11138
System.InvalidOperationException: Sequence contains more than one matching element
at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
at FootyLinks.Processes.PlayerExtractor.GetCurrentClubName() in C:\_Development\FootyLinks\CSharpApp\FootyLinks.Processes\PlayerExtractor.cs:line 87
at FootyLinks.DataImporter.Program.importPlayer(String sourceFilePath, Int32 sourceReference) in C:\_Development\FootyLinks\CSharpApp\FootyLinks.DataImporter\Program.cs:line 61
at FootyLinks.DataImporter.Program.Main(String[] args) in C:\_Development\FootyLinks\CSharpApp\FootyLinks.DataImporter\Program.cs:line 36


Source Reference: 11247
System.InvalidOperationException: Sequence contains more than one matching element
at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
at FootyLinks.Processes.PlayerExtractor.GetCurrentClubName() in C:\_Development\FootyLinks\CSharpApp\FootyLinks.Processes\PlayerExtractor.cs:line 87
at FootyLinks.DataImporter.Program.importPlayer(String sourceFilePath, Int32 sourceReference) in C:\_Development\FootyLinks\CSharpApp\FootyLinks.DataImporter\Program.cs:line 61
at FootyLinks.DataImporter.Program.Main(String[] args) in C:\_Development\FootyLinks\CSharpApp\FootyLinks.DataImporter\Program.cs:line 36


Source Reference: 11457
System.InvalidOperationException: Sequence contains more than one matching element
at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
at FootyLinks.Processes.PlayerExtractor.GetCurrentClubName() in C:\_Development\FootyLinks\CSharpApp\FootyLinks.Processes\PlayerExtractor.cs:line 87
at FootyLinks.DataImporter.Program.importPlayer(String sourceFilePath, Int32 sourceReference) in C:\_Development\FootyLinks\CSharpApp\FootyLinks.DataImporter\Program.cs:line 61
at FootyLinks.DataImporter.Program.Main(String[] args) in C:\_Development\FootyLinks\CSharpApp\FootyLinks.DataImporter\Program.cs:line 36


Source Reference: 11957
System.InvalidOperationException: Sequence contains more than one matching element
at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
at FootyLinks.Processes.PlayerExtractor.GetCurrentClubName() in C:\_Development\FootyLinks\CSharpApp\FootyLinks.Processes\PlayerExtractor.cs:line 87
at FootyLinks.DataImporter.Program.importPlayer(String sourceFilePath, Int32 sourceReference) in C:\_Development\FootyLinks\CSharpApp\FootyLinks.DataImporter\Program.cs:line 61
at FootyLinks.DataImporter.Program.Main(String[] args) in C:\_Development\FootyLinks\CSharpApp\FootyLinks.DataImporter\Program.cs:line 36


Source Reference: 12185
System.InvalidOperationException: Sequence contains more than one matching element
at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
at FootyLinks.Processes.PlayerExtractor.GetCurrentClubName() in C:\_Development\FootyLinks\CSharpApp\FootyLinks.Processes\PlayerExtractor.cs:line 87
at FootyLinks.DataImporter.Program.importPlayer(String sourceFilePath, Int32 sourceReference) in C:\_Development\FootyLinks\CSharpApp\FootyLinks.DataImporter\Program.cs:line 61
at FootyLinks.DataImporter.Program.Main(String[] args) in C:\_Development\FootyLinks\CSharpApp\FootyLinks.DataImporter\Program.cs:line 36


Source Reference: 12240
System.InvalidOperationException: Sequence contains more than one matching element
at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
at FootyLinks.Processes.PlayerExtractor.GetCurrentClubName() in C:\_Development\FootyLinks\CSharpApp\FootyLinks.Processes\PlayerExtractor.cs:line 87
at FootyLinks.DataImporter.Program.importPlayer(String sourceFilePath, Int32 sourceReference) in C:\_Development\FootyLinks\CSharpApp\FootyLinks.DataImporter\Program.cs:line 61
at FootyLinks.DataImporter.Program.Main(String[] args) in C:\_Development\FootyLinks\CSharpApp\FootyLinks.DataImporter\Program.cs:line 36


Source Reference: 12245
System.InvalidOperationException: Sequence contains more than one matching element
at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
at FootyLinks.Processes.PlayerExtractor.GetCurrentClubName() in C:\_Development\FootyLinks\CSharpApp\FootyLinks.Processes\PlayerExtractor.cs:line 87
at FootyLinks.DataImporter.Program.importPlayer(String sourceFilePath, Int32 sourceReference) in C:\_Development\FootyLinks\CSharpApp\FootyLinks.DataImporter\Program.cs:line 61
at FootyLinks.DataImporter.Program.Main(String[] args) in C:\_Development\FootyLinks\CSharpApp\FootyLinks.DataImporter\Program.cs:line 36


Source Reference: 12296
System.InvalidOperationException: Sequence contains more than one matching element
at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
at FootyLinks.Processes.PlayerExtractor.GetCurrentClubName() in C:\_Development\FootyLinks\CSharpApp\FootyLinks.Processes\PlayerExtractor.cs:line 87
at FootyLinks.DataImporter.Program.importPlayer(String sourceFilePath, Int32 sourceReference) in C:\_Development\FootyLinks\CSharpApp\FootyLinks.DataImporter\Program.cs:line 61
at FootyLinks.DataImporter.Program.Main(String[] args) in C:\_Development\FootyLinks\CSharpApp\FootyLinks.DataImporter\Program.cs:line 36


Source Reference: 12318
System.InvalidOperationException: Sequence contains more than one matching element
at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
at FootyLinks.Processes.PlayerExtractor.GetCurrentClubName() in C:\_Development\FootyLinks\CSharpApp\FootyLinks.Processes\PlayerExtractor.cs:line 87
at FootyLinks.DataImporter.Program.importPlayer(String sourceFilePath, Int32 sourceReference) in C:\_Development\FootyLinks\CSharpApp\FootyLinks.DataImporter\Program.cs:line 61
at FootyLinks.DataImporter.Program.Main(String[] args) in C:\_Development\FootyLinks\CSharpApp\FootyLinks.DataImporter\Program.cs:line 36


Source Reference: 12359
System.InvalidOperationException: Sequence contains more than one matching element
at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
at FootyLinks.Processes.PlayerExtractor.GetCurrentClubName() in C:\_Development\FootyLinks\CSharpApp\FootyLinks.Processes\PlayerExtractor.cs:line 87
at FootyLinks.DataImporter.Program.importPlayer(String sourceFilePath, Int32 sourceReference) in C:\_Development\FootyLinks\CSharpApp\FootyLinks.DataImporter\Program.cs:line 61
at FootyLinks.DataImporter.Program.Main(String[] args) in C:\_Development\FootyLinks\CSharpApp\FootyLinks.DataImporter\Program.cs:line 36


Source Reference: 12653
System.InvalidOperationException: Sequence contains more than one matching element
at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
at FootyLinks.Processes.PlayerExtractor.GetCurrentClubName() in C:\_Development\FootyLinks\CSharpApp\FootyLinks.Processes\PlayerExtractor.cs:line 87
at FootyLinks.DataImporter.Program.importPlayer(String sourceFilePath, Int32 sourceReference) in C:\_Development\FootyLinks\CSharpApp\FootyLinks.DataImporter\Program.cs:line 61
at FootyLinks.DataImporter.Program.Main(String[] args) in C:\_Development\FootyLinks\CSharpApp\FootyLinks.DataImporter\Program.cs:line 36


Source Reference: 1269
System.InvalidOperationException: Sequence contains more than one matching element
at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
at FootyLinks.Processes.PlayerExtractor.GetCurrentClubName() in C:\_Development\FootyLinks\CSharpApp\FootyLinks.Processes\PlayerExtractor.cs:line 87
at FootyLinks.DataImporter.Program.importPlayer(String sourceFilePath, Int32 sourceReference) in C:\_Development\FootyLinks\CSharpApp\FootyLinks.DataImporter\Program.cs:line 61
at FootyLinks.DataImporter.Program.Main(String[] args) in C:\_Development\FootyLinks\CSharpApp\FootyLinks.DataImporter\Program.cs:line 36


Source Reference: 12835
System.InvalidOperationException: Sequence contains more than one matching element
at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
at FootyLinks.Processes.PlayerExtractor.GetCurrentClubName() in C:\_Development\FootyLinks\CSharpApp\FootyLinks.Processes\PlayerExtractor.cs:line 87
at FootyLinks.DataImporter.Program.importPlayer(String sourceFilePath, Int32 sourceReference) in C:\_Development\FootyLinks\CSharpApp\FootyLinks.DataImporter\Program.cs:line 61
at FootyLinks.DataImporter.Program.Main(String[] args) in C:\_Development\FootyLinks\CSharpApp\FootyLinks.DataImporter\Program.cs:line 36


Source Reference: 13135
System.InvalidOperationException: Sequence contains more than one matching element
at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
at FootyLinks.Processes.PlayerExtractor.GetCurrentClubName() in C:\_Development\FootyLinks\CSharpApp\FootyLinks.Processes\PlayerExtractor.cs:line 87
at FootyLinks.DataImporter.Program.importPlayer(String sourceFilePath, Int32 sourceReference) in C:\_Development\FootyLinks\CSharpApp\FootyLinks.DataImporter\Program.cs:line 61
at FootyLinks.DataImporter.Program.Main(String[] args) in C:\_Development\FootyLinks\CSharpApp\FootyLinks.DataImporter\Program.cs:line 36


Source Reference: 13471
System.InvalidOperationException: Sequence contains more than one matching element
at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
at FootyLinks.Processes.PlayerExtractor.GetCurrentClubName() in C:\_Development\FootyLinks\CSharpApp\FootyLinks.Processes\PlayerExtractor.cs:line 87
at FootyLinks.DataImporter.Program.importPlayer(String sourceFilePath, Int32 sourceReference) in C:\_Development\FootyLinks\CSharpApp\FootyLinks.DataImporter\Program.cs:line 61
at FootyLinks.DataImporter.Program.Main(String[] args) in C:\_Development\FootyLinks\CSharpApp\FootyLinks.DataImporter\Program.cs:line 36


0 comments on commit 34f7f85

Please sign in to comment.