![]() |
#1 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 800
Karma: 194644
Join Date: Dec 2007
Location: Argentina
Device: Kindle Voyage
|
Issue with Harper's recipe
recently login support for Harpers full recipe stopped working. After looking at the site and the code I'm still not sure what it is that is wrong.
I used this to login as a latest version but no luck. Code:
def get_browser(self): br = BasicNewsRecipe.get_browser(self) br.open(self.INDEX) if self.username is not None and self.password is not None: br.addheaders.append(('X-Requested-With', 'XMLHttpRequest')) tt = str(int(time.time() * 1000)) data = urllib.urlencode({ 'm':self.username ,'p':self.password ,'rt':self.INDEX ,'tt':tt }) br.open(self.LOGIN, data) return br Any ideas what am I missing? |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 44,195
Karma: 23000010
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
It might be that the site needs javascript to login. Try using the javascript login functionality, see the hbr recipe for an example.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 800
Karma: 194644
Join Date: Dec 2007
Location: Argentina
Device: Kindle Voyage
|
The site does need js login but what calibre offers does not work. I tried it and it time outs.
|
![]() |
![]() |
![]() |
#4 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 44,195
Karma: 23000010
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
You can increase the timeout's, you can also use a full javascript recipe, which uses a headless webkit browser to scrape the site, see the time recipe for example.
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Minor issue with padding of Sueddeutsche recipe | aerodynamik | Recipes | 7 | 02-03-2015 03:39 PM |
Harper's Print Edition recipe update | rainrdx | Recipes | 5 | 04-04-2013 10:38 AM |
Issue with Recipe | raijinfolly | Recipes | 3 | 04-24-2012 11:17 AM |
Washington Post Recipe Issue | patp1946 | Recipes | 2 | 04-04-2012 01:30 AM |
Harper's Island | digitalzen | Lounge | 19 | 06-29-2009 11:48 AM |