Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

re.search() or page.get_data() not working #23

Open
luca-martial opened this issue Oct 30, 2019 · 1 comment
Open

re.search() or page.get_data() not working #23

luca-martial opened this issue Oct 30, 2019 · 1 comment

Comments

@luca-martial
Copy link

luca-martial commented Oct 30, 2019

Seems like there is an issue, this is not running, but I don't have any other idea of what could be happening?
See screenshot below:
Screen Shot 2019-10-17 at 12 48 59 PM

@buckeye17
Copy link

buckeye17 commented Nov 29, 2019

I've run into the same issue. It appears that modifying line 49 of download.py as follows fixes the error (I appended decode("utf-8") to the method chain):
script_url = re.search(pattern, page.get_data().decode("utf-8")).group()[1:-1]

With this correction, a new error results because it fails to open the corresponding URL. The webpage response is: HTTP Error 500: Internal Server Error

According to the discussion for Issue #22 script_url should be hard coded to "http://sso.garmin.com/sso/signin". After doing this, I found other TypeError instances that look identical luca's error. They were also resolved with the same decode("utf-8") trick. These changes were made on lines 94, 96 & 102.

Lastly, urllib.urlencode(data) on line 80 needs to be modified to urllib.parse.urlencode(data) because urllib has been changed accordingly.

After all of these changes, the script fails to download any data because of, "Wrong credentials for user..." On this error, I'm clueless what to do. I'm able to load the initurl URL manually in my browser without a problem, but the agent.open() fails to execute.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants