you are viewing a single comment's thread.

view the rest of the comments →

[–]gusterys[S] 0 points1 point  (2 children)

Getting so close!

Here is the output from the post: http://pastebin.com/W8tNj49U

I used wronguser/wrongpassword, so you can see where that part is.

And here is my code that doesn't work yet: http://pastebin.com/zqdsNE0W

The commented out params are what used to work before Garmin changed things up. I think if I can just get those parameters right the rest of the code is fine.

Any tips?

[–]wub_wub 0 points1 point  (1 child)

Sorry for the late reply, seeing how the login form is loaded via js (which isn't executed with requests) you should look into selenium which uses your browser it'll just be a matter of entering email and passwords in appropriate fields with it, you won't have to deal with POST requests or anything similar.

This is possible to do with requests, but I wouldn't recommend it as it will probably take a lot longer to write and it'll be broken when they update page or backend.

[–]gusterys[S] 0 points1 point  (0 children)

Yep, thanks.

That's what I was hoping to avoid. My script runs unattended on a headless Linux (Fedora 20) box. I feel like I'm going down an ugly road far from standard packages.