cpsievert / pitchRx

Tools for scraping MLB Gameday data and Visualizing PITCHf/x
http://cpsievert.github.io/pitchRx/
Other
123 stars 33 forks source link

Update scrape function to account for MLBAM's new trailing slash requirement #57

Closed jrbattles closed 6 years ago

jrbattles commented 6 years ago

https://www.reddit.com/r/Sabermetrics/comments/7v07ax/mlb_gameday_data_sites_down_went_private/

jrbattles commented 6 years ago

This does NOT work. http://gd2.mlb.com/components/game/mlb/year_2017/month_04/day_02/ This does work. http://gd2.mlb.com/components/game/mlb/year_2017/month_04/day_02

cpsievert commented 6 years ago

That's a bummer. I don't really have the bandwidth for this project anymore...would love a pull request with a fix!

jrbattles commented 6 years ago

this seems to be only a problem for 2017 regular season data.

Mpellet771 commented 6 years ago

I found where the code needs to be changed but am not sure how to submit the fix. Anyone else figure it out?

cpsievert commented 6 years ago

@Mpellet771 one way to submit a fix is to use the "edit this file" option

screen shot 2018-02-20 at 12 45 13 pm

cpsievert commented 6 years ago

@Mpellet771 could you please point to where the fix needs to be made?

cpsievert commented 6 years ago

It looks like the real issue here is related to https://github.com/cpsievert/pitchRx/issues/58#issuecomment-372900373. Anyway, 4dcad301828ed3341ae7da55aa1237737af3c856 should at least solve the issue for 2017. Please update and give it a whirl!

Mpellet771 commented 6 years ago

Thank you! I’ll check it out.

Apologies for disappearing on you, but baseball season is coming up, so I do want to download some data.

Thanks!

--Marianne

From: Carson Sievert notifications@github.com Sent: Thursday, March 22, 2018 11:28 AM To: cpsievert/pitchRx pitchRx@noreply.github.com Cc: Mpellet771 mpellet771@htva.net; Mention mention@noreply.github.com Subject: Re: [cpsievert/pitchRx] Update scrape function to account for MLBAM's new trailing slash requirement (#57)

It looks like the real issue here is related to #58 (comment) https://github.com/cpsievert/pitchRx/issues/58#issuecomment-372900373 . Anyway, https://github.com/cpsievert/pitchRx/commit/4dcad301828ed3341ae7da55aa1237737af3c856 4dcad30 should at least solve the issue for 2017. Please update and give it a whirl!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/cpsievert/pitchRx/issues/57#issuecomment-375347931 , or mute the thread https://github.com/notifications/unsubscribe-auth/AG9PxGz2pusiDKrKFnTsH6s86_xK-IByks5tg8MIgaJpZM4R7zS9 . https://github.com/notifications/beacon/AG9PxG5Z0QYYtptuFZGpR4-p2dbp9cq8ks5tg8MIgaJpZM4R7zS9.gif

znmeb commented 6 years ago

fixed in openWAR - https://github.com/beanumber/openWAR/pull/113

jrbattles commented 6 years ago

so this was fixed in openWAR but was it also fixed here in pitchRX?

Mpellet771 commented 5 years ago

Here is where the issue is: Works: http://gd2.mlb.com/components/game/mlb/year_2019/month_03/day_23 Does not work: http://gd2.mlb.com/components/game/mlb/year_2019/month_03/day_23/

Even if I click a link at http://gd2.mlb.com/components/game/mlb/year_2019/month_03/, it tries to link with the forward slash, and then I get an error. The scraper needs to leave off the forward slash for the day link, get the game IDs, and then prepend the forward slash.

Thanks.