home *** CD-ROM | disk | FTP | other *** search
/ Chip 2011 November / CHIP_2011_11.iso / Programy / Narzedzia / Calibre / calibre-0.8.18.msi / file_280 / arizona_republic.recipe < prev    next >
Text File  |  2011-09-09  |  5KB  |  69 lines

  1. __license__   = 'GPL v3'
  2. __copyright__ = '2010, jolo'
  3. '''
  4. azrepublic.com
  5. '''
  6. from calibre.web.feeds.recipes import BasicNewsRecipe
  7.  
  8. class AdvancedUserRecipe1307301031(BasicNewsRecipe):
  9.     title          = u'AZRepublic'
  10.     __author__            = 'Jim Olo'
  11.     language              = 'en'
  12.     description           = "The Arizona Republic is Arizona's leading provider of news and information, and has published a daily newspaper in Phoenix for more than 110 years"
  13.     publisher             = 'AZRepublic/AZCentral'
  14.     masthead_url           = 'http://freedom2t.com/wp-content/uploads/press_az_republic_v2.gif'
  15.     cover_url              = 'http://www.valleyleadership.org/Common/Img/2line4c_AZRepublic%20with%20azcentral%20logo.jpg'
  16.     category              = 'news, politics, USA, AZ, Arizona'
  17.  
  18.     oldest_article = 7
  19.     max_articles_per_feed = 100
  20.     remove_empty_feeds = True
  21.     no_stylesheets         = True
  22.     remove_javascript      = True
  23. #    extra_css      = '.headline {font-size: medium;} \n .fact { padding-top: 10pt  }'
  24.     extra_css              = ' body{ font-family: Verdana,Helvetica,Arial,sans-serif } .headline {font-size: medium} .introduction{font-weight: bold} .story-feature{display: block; padding: 0; border: 1px solid; width: 40%; font-size: small} .story-feature h2{text-align: center; text-transform: uppercase} '
  25.  
  26.     remove_attributes = ['width','height','h2','subHeadline','style']
  27.     remove_tags = [
  28.                 dict(name='div', attrs={'id':['slidingBillboard', 'top728x90', 'subindex-header', 'topSearch']}),
  29.                 dict(name='div', attrs={'id':['simplesearch', 'azcLoginBox', 'azcLoginBoxInner', 'topNav']}),
  30.                 dict(name='div', attrs={'id':['carsDrop', 'homesDrop', 'rentalsDrop', 'classifiedDrop']}),
  31.                 dict(name='div', attrs={'id':['nav', 'mp', 'subnav', 'jobsDrop']}),
  32.                 dict(name='h6', attrs={'class':['section-header']}),
  33.                 dict(name='a', attrs={'href':['#comments']}),
  34.                 dict(name='div', attrs={'class':['articletools clearfix', 'floatRight']}),
  35.                 dict(name='div', attrs={'id':['fbFrame', 'ob', 'storyComments', 'storyGoogleAdBox']}),
  36.                 dict(name='div', attrs={'id':['storyTopHomes', 'openRight', 'footerwrap', 'copyright']}),
  37.                 dict(name='div', attrs={'id':['blogsHed', 'blog_comments', 'blogByline','blogTopics']}),
  38.                 dict(name='div', attrs={'id':['membersRightMain', 'dealsfooter', 'azrTopHed', 'azrRightCol']}),
  39.                 dict(name='div', attrs={'id':['ttdHeader', 'ttdTimeWeather']}),
  40.                 dict(name='div', attrs={'id':['membersRightMain', 'deals-header-wrap']}),
  41.                 dict(name='div', attrs={'id':['todoTopSearchBar', 'byline clearfix', 'subdex-topnav']}),
  42.                 dict(name='h1',  attrs={'id':['SEOtext']}),
  43.                 dict(name='table', attrs={'class':['ap-mediabox-table']}),
  44.                 dict(name='p', attrs={'class':['ap_para']}),
  45.                 dict(name='span', attrs={'class':['source-org vcard', 'org fn']}),
  46.                 dict(name='a', attrs={'href':['http://hosted2.ap.org/APDEFAULT/privacy']}),
  47.                 dict(name='a', attrs={'href':['http://hosted2.ap.org/APDEFAULT/terms']}),
  48.                 dict(name='div', attrs={'id':['onespot_nextclick']}),
  49.                    ]
  50.  
  51.     feeds          = [
  52.                            (u'FrontPage', u'http://www.azcentral.com/rss/feeds/republicfront.xml'),
  53.                            (u'TopUS-News', u'http://hosted.ap.org/lineups/USHEADS.rss?SITE=AZPHG&SECTION=HOME'),
  54.                            (u'WorldNews', u'http://hosted.ap.org/lineups/WORLDHEADS.rss?SITE=AZPHG&SECTION=HOME'),
  55.                            (u'TopBusiness', u'http://hosted.ap.org/lineups/BUSINESSHEADS.rss?SITE=AZPHG&SECTION=HOME'),
  56.                            (u'Entertainment', u'http://hosted.ap.org/lineups/ENTERTAINMENT.rss?SITE=AZPHG&SECTION=HOME'),
  57.                            (u'ArizonaNews', u'http://www.azcentral.com/rss/feeds/news.xml'),
  58.                            (u'Gilbert', u'http://www.azcentral.com/rss/feeds/gilbert.xml'),
  59.                            (u'Chandler', u'http://www.azcentral.com/rss/feeds/chandler.xml'),
  60.                            (u'DiningReviews', u'http://www.azcentral.com/rss/feeds/diningreviews.xml'),
  61.                            (u'AZBusiness', u'http://www.azcentral.com/rss/feeds/business.xml'),
  62.                            (u'ArizonaDeals', u'http://www.azcentral.com/members/Blog%7E/RealDealsblog'),
  63.                            (u'GroceryDeals', u'http://www.azcentral.com/members/Blog%7E/RealDealsblog/tag/2646')
  64.                            ]
  65.  
  66.  
  67.  
  68.  
  69.