My local newspaper just went to a pay-for-online-content model which requires paper subscribers to enter a userid/password to view local articles. I am a subscriber, and have the userid/password (which I have entered on the 'Fetch News' screen), but I still get errors when running the recipe (to which I've added "needs_subscription=True"). Do I need to add other specialized code to the recipe for this to work? I get a lot of the paper, but links to the local section don't go to the articles - they go to random other spots.
------------------------
import string, re
class Telegram(BasicNewsRecipe):
title = 'Telegram'
oldest_article = 2
timefmt = ''
max_articles_per_feed = 100
no_stylesheets = False
use_embedded_content = False
encoding = 'cp1252'
needs_subscription = True
publication_type = 'newspaper'
remove_empty_feeds = True
extra_css = ' body{font-family: Verdana,sans-serif} .headline{font-size: xx-large; font-weight: bold} .mainPhotoCaption{font-size: x-small} '
keep_only_tags = [dict(name='div', attrs={'id':'articleWell'})]
remove_tags_before = dict(attrs={'class':'headline'})
remove_tags_after = dict(attrs={'id':'zoom1'})
remove_tags = [
dict(name='div', attrs={'class':'relatedContent'})
,dict(name=['object','link','iframe'])
]
feeds = [(u'Front Page News', u'http://www.telegram.com/apps/pbcs.dll/section?Category=RSS03&MIME=xml'),
(u'World & Regional', u'http://www.telegram.com/apps/pbcs.dll/section?Category=rss01&MIME=xml&profile=1052'),
(u'Living', u'http://www.telegram.com/apps/pbcs.dll/section?Category=rss01&MIME=xml&profile=1011'),
(u'Local News', u'http://www.telegram.com/apps/pbcs.dll/section?Category=rss01&MIME=xml&profile=1101'),
(u'Business', u'http://www.telegram.com/apps/pbcs.dll/section?Category=rss01&MIME=xml&profile=1002'),
(u'Opinion', u'http://www.telegram.com/apps/pbcs.dll/section?Category=rss01&MIME=xml&profile=1017'),
(u'Deaths', u'http://www.telegram.com/apps/pbcs.dll/section?Category=rss01&MIME=xml&profile=1001'),
(u'Sports', u'http://telegram.com/apps/pbcs.dll/section?Category=rss01&MIME=xml&profile=1009'),
(u'Court Records', u'http://www.telegram.com/apps/pbcs.dll/section?Category=rss01&MIME=xml&profile=1056'),
(u'As I See It', u'http://www.telegram.com/apps/pbcs.dll/section?Category=rss01&MIME=xml&profile=1054')]
Last edited by olaf; 08-20-2010 at 08:44 AM.
|