aj0strow / espn-scraper

a simple gem for scraping teams and scores from ESPN
32 stars 23 forks source link

Fix broken MLB scores again #4

Closed dgmdan closed 9 years ago

dgmdan commented 9 years ago

Looks like ESPN changed up their layout again for MLB scoreboard pages. Instead of putting the scoreboard JSON data in an HTML attribute, now it's hiding inside JS code inline on the page. Although slightly gross, this new code extracts the JSON using a regular expression. All tests are passing for me.

aj0strow commented 9 years ago

Yeah scraping gets messy. Thanks for sending in the patch.