Permalink
Browse files

Updated PlayerExtractor - Need to modify logic for finding the curren…

…t club.
  • Loading branch information...
1 parent 4c50fe9 commit 34f7f85142a583fb27bfa6f2debb7fd7c4f43949 @MikeHook committed May 2, 2011
Showing with 1,415 additions and 1 deletion.
  1. +17 −1 CSharpApp/FootyLinks.Processes/PlayerExtractor.cs
  2. +2 −0 ErrorLog/dbStats.txt
  3. +200 −0 ErrorLog/importErrorlog.txt
  4. +1,196 −0 ErrorLog/importInfolog.txt
@@ -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);
View
@@ -0,0 +1,2 @@
+Players: 48771
+Clubs: 2340
View
@@ -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
+
+
Oops, something went wrong.

0 comments on commit 34f7f85

Please sign in to comment.