Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Recipes

Notices

Reply
 
Thread Tools Search this Thread
Old 11-21-2010, 11:47 AM   #1
alexisvx
Junior Member
alexisvx began at the beginning.
 
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')]
alexisvx is offline   Reply With Quote
Old 11-22-2010, 11:48 AM   #2
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by alexisvx View Post
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)
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?
Starson17 is offline   Reply With Quote
Advert
Old 11-23-2010, 06:11 PM   #3
alexisvx
Junior Member
alexisvx began at the beginning.
 
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?
alexisvx is offline   Reply With Quote
Old 11-23-2010, 07:58 PM   #4
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by alexisvx View Post
For future reference how do I wrap in CODE tags?
Highlight, then press the # button.
Starson17 is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
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


All times are GMT -4. The time now is 03:29 PM.


MobileRead.com is a privately owned, operated and funded community.