You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not dissimilar to what #53 tried to address with missing POBs. Players who are young seem to be thrown into an HTML structure that's not kind to our old scrape task.
It seems to be that the issue is, indeed, from that above-mentioned parent_span. I originally had it as doc.css but later changed it to doc.at_css which couldn't locate something that had children. The former does find something and thus obfuscated this error from us. It would look through the children and none of the if statements would be hit, so the player would just save.
These do seem to be players who have different HTML formatting on their pages because they're young and recent call ups into the first team. We remedied it originally with the scrape_player_missing_pob.rake Now we just have to decide how to address this. This is basically the effect we want, but we were just lucky that the css selector didn't break earlier
http://www.transfermarkt.com/aaron-seydel/profil/spieler/187499
NoMethodError: undefined method `children' for nil:NilClass /home/sunsheeppoplar/WebDev/fun-projects/shapeOfTeam/lib/tasks/scrape_player_place_of_birth.rake:24:in `block (3 levels) in <top (required)>
Need to refactor immediately. Offending line is line 22 of
scrape_player_place_of_birth
:parent_span = doc.at_css('.hide-for-small>span.dataValue')
Maybe don't look in
.hide-for-small
since they usually have a corresponding value for standard window sizesThe text was updated successfully, but these errors were encountered: