![]() |
#1 |
doofus
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,543
Karma: 13089041
Join Date: Sep 2010
Device: Kobo Libra 2, Kindle Voyage
|
Cannot select login form
Hi
I'm trying to download lesson notes and tips from duolingo.com. It requires login to access any lesson page, but I am unable to select the form Code:
def get_browser(self): br = BasicNewsRecipe.get_browser(self) br.open('http://en.duolingo.com/Signin') br.select_form(nr=0) On the page, you have to click Login button to access pop down login form. That's probably the problem. Any hint how I can deal with this? Thanks in advance |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,265
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
If it is using javascript to login, then you have to watch the login requests using a browser extension like httptrack and duplicate those in python directly, using mechanize.Request, see for example the builtin recipe for wall street journal.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
doofus
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,543
Karma: 13089041
Join Date: Sep 2010
Device: Kobo Libra 2, Kindle Voyage
|
I just realized that every page on that site is just an empty div and approximately 2.5 tons of JavaScript! It's just too much for me to deal with
![]() Edit: maybe it's not that bad. I think I can, I think I can, I think I can... thank you, Kovid Last edited by Barty; 10-03-2016 at 10:57 AM. |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Simple form | marcelo2605 | ePub | 8 | 08-29-2011 08:51 AM |
hello form Ireland | lisij | Introduce Yourself | 6 | 08-15-2011 11:19 AM |
A form-like layout | Toxaris | ePub | 6 | 01-08-2011 07:25 AM |
Hi everyone form New York | iAmBeer | Introduce Yourself | 1 | 11-21-2007 03:45 PM |