Closed mikewojnowicz closed 6 years ago
Hmm - I just tried running it and works fine for me so I wonder if they have multiple login flows. What flow do you see when you try it? You can inspect the source code and see what they have as the element for the username field.
Ah, dang, you're right. The problem, it turns out, is that I was using my League name as the YAHOO_LEAGUEID in settings.py. I didn't realize there was a numerical identifier as well. Thanks :)
Hey Dan,
Very excited to see this repo! (Also, btw, fellow Cornell alum here :)
Tried using it tonight, ran into a problem. Wondering if you could help. Please excuse the fact that this is my first exposure to selenium and web scraping.
I created a settings.py as follows:
YAHOO_USERNAME = /redacted_string_here/ YAHOO_PASSWORD = /redacted_string_here/ YAHOO_LEAGUEID = /redacted_string_here/
When stepping through the lines of login(), this line:
driver.get("http://football.fantasysports.yahoo.com/f1/{0}".format(settings.YAHOO_LEAGUEID))
runs without complaint,
but the next line:
username = driver.find_element_by_name('username')
produces a NoSuchElementException, as cut and paste below.
I'm wondering if Yahoo changed their login procedure such that the code in this repo is no longer valid, or if perhaps I'm doing something wrong (and if so, if there's anything you could recommend to proceed further.)
In [14]: username = driver.find_element_by_name('username')
NoSuchElementException Traceback (most recent call last)