![]() |
#1 |
Junior Member
![]() Posts: 2
Karma: 10
Join Date: Nov 2010
Device: Kindle
|
User/Pass not recognised in Fetch News
Hi,
I have tried to make a recipe for 'Screen International' which needs a subscription (I am a subscriber). Although I manage to get all the articles downloaded, they are all cut in half and say in the body of the article: 'Subscriber only content, You need to be a subscriber to read the article'. I do insert the correct username and password in the Calibre 'Fetch News' section. I have never used python before, can someone tell me who to properly input the username password in the recipe? Thank you for your help. ( I have included the recipe below) import mechanize, string, urllib, time, re class AdvancedUserRecipe1290343011(BasicNewsRecipe): title = u'Screen International 5' oldest_article = 30 max_articles_per_feed = 100 needs_subscription = True def get_browser(self): br = BasicNewsRecipe.get_browser() br.open('http://www.screendaily.com') req = mechanize.Request( 'http://www.screendaily.com/sign-in?js=yes&height=auto&width=620', headers = { 'Referer':'http://www.screendaily.com/', }, data=urllib.urlencode({ 'logging_in' : 'Y', 'returnURL' : '/', 'SIemail': self.username, 'fakepword' : 'Password', 'passWord' : self.password, 'x' : '0', 'y' : '0', })) br.open(req).read() return br feeds = [(u'Latest News', u'http://www.screendaily.com/XmlServers/navsectionRSS.aspx?navsectioncode=3'), (u'Corporate News', u'http://www.screendaily.com/XmlServers/navsectionRSS.aspx?navsectioncode=115'), (u'Production News', u'http://www.screendaily.com/XmlServers/navsectionRSS.aspx?navsectioncode=279'), (u'In Focus', u'http://www.screendaily.com/XmlServers/navsectionRSS.aspx?navsectioncode=625'), (u'Opinion', u'http://www.screendaily.com/XmlServers/navsectionRSS.aspx?navsectioncode=669'), (u'Profiles', u'http://www.screendaily.com/XmlServers/navsectionRSS.aspx?navsectioncode=472'), (u'Market News', u'http://www.screendaily.com/XmlServers/navsectionRSS.aspx?navsectioncode=281'), (u'Analysis', u'http://www.screendaily.com/XmlServers/navsectionRSS.aspx?navsectioncode=624'), (u'Digital News', u'http://www.screendaily.com/XmlServers/navsectionRSS.aspx?navsectioncode=283')] |
![]() |
![]() |
![]() |
#2 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
You need to wrap CODE tags around the recipe to preserve formatting. Otherwise, it's hard for anyone to use/test your recipe. Is this a free subscription or a paid site?
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Junior Member
![]() Posts: 2
Karma: 10
Join Date: Nov 2010
Device: Kindle
|
Thank you for the reply, I managed to work it out. I just used another recipe with a different login code. I tried so many combinations for a few hours, I almost went crazy. For future reference how do I wrap in CODE tags?
|
![]() |
![]() |
![]() |
#4 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Unable to fetch news | hbilly2002 | Calibre | 1 | 10-25-2010 11:11 PM |
isbndb.com - Where to enter user/pass? | Starson17 | Calibre | 2 | 12-22-2009 10:19 AM |
Can't Fetch News | Catew | Calibre | 2 | 07-19-2009 07:46 PM |
Parser can't identify form used for user/pass | Solari | Calibre | 3 | 03-01-2009 07:04 PM |
Fetch News | philipdavies | Calibre | 5 | 10-08-2008 04:33 AM |