j-andrews7 / kenpompy

A simple yet comprehensive web scraper for kenpom.com.
https://kenpompy.readthedocs.io/en/latest/?badge=latest
GNU General Public License v3.0
70 stars 21 forks source link

get_efficiency not working #10

Closed fmathews11 closed 2 years ago

fmathews11 commented 2 years ago

Greetings! I may be overlooking something simple here, but when I run the example provided on the readme, I get an error:

`~\anaconda3\lib\site-packages\kenpompy\summary.py in get_efficiency(browser, season) 37 browser.open(url) 38 eff = browser.get_current_page() ---> 39 table = eff.find_all('table')[0] 40 eff_df = pd.read_html(str(table)) 41

IndexError: list index out of range`

j-andrews7 commented 2 years ago

Yeah, pretty sure the HTML on the site changed slightly. I think there's a PR that fixes this. I have some time Friday so I'll take a look then and try to get a new release out that fixes this.

On Wed, Nov 10, 2021, 8:27 AM Frank Mathews @.***> wrote:

Greetings! I may be overlooking something simple here, but when I run the example provided on the readme, I get an error:

`~\anaconda3\lib\site-packages\kenpompy\summary.py in get_efficiency(browser, season) 37 browser.open(url) 38 eff = browser.get_current_page() ---> 39 table = eff.find_all('table')[0] 40 eff_df = pd.read_html(str(table)) 41

IndexError: list index out of range`

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/j-andrews7/kenpompy/issues/10, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACOAQNEYMWKRFEHLEJA2SXTULJ6M7ANCNFSM5HYBB2TA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

j-andrews7 commented 2 years ago

I was unable to replicate this. Did you login properly?

fmathews11 commented 2 years ago

Not exactly sure what/why/how, but re-ran the same code and it appears to be working now.