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

  1. from calibre.web.feeds.news import BasicNewsRecipe
  2.  
  3. class AdvancedUserRecipe1271637235(BasicNewsRecipe):
  4.  
  5.     title          = u'Thairath'
  6.     __author__ = 'Anat R.'
  7.     language = 'th'
  8.  
  9.     oldest_article = 7
  10.  
  11.     max_articles_per_feed = 100
  12.     no_stylesheets = True
  13.  
  14.     remove_javascript = True
  15.  
  16.     use_embedded_content = False
  17.     feeds          = [(u'News',
  18. u'http://www.thairath.co.th/rss/news.xml'), (u'Politics',
  19. u'http://www.thairath.co.th/rss/pol.xml'), (u'Economy',
  20. u'http://www.thairath.co.th/rss/eco.xml'), (u'International',
  21. u'http://www.thairath.co.th/rss/oversea.xml'), (u'Sports',
  22. u'http://www.thairath.co.th/rss/sport.xml'), (u'Life',
  23. u'http://www.thairath.co.th/rss/life.xml'), (u'Education',
  24. u'http://www.thairath.co.th/rss/edu.xml'), (u'Tech',
  25. u'http://www.thairath.co..th/rss/tech.xml'), (u'Entertainment',
  26. u'http://www.thairath.co.th/rss/ent.xml')]
  27.     keep_only_tags = []
  28.  
  29.     keep_only_tags.append(dict(name = 'h1', attrs = {'id' : 'title'}))
  30.  
  31.     keep_only_tags.append(dict(name = 'ul', attrs = {'class' :
  32. 'detail-info'}))
  33.  
  34.     keep_only_tags.append(dict(name = 'img', attrs = {'class' :
  35. 'detail-image'}))
  36.  
  37.     keep_only_tags.append(dict(name = 'div', attrs = {'class' :
  38. 'entry'}))
  39.     remove_tags = []
  40.     remove_tags.append(dict(name = 'div', attrs = {'id':
  41. 'menu-holder'}))
  42.  
  43.     remove_tags.append(dict(name = 'div', attrs = {'class':
  44. 'addthis_toolbox addthis_default_style'}))
  45.  
  46.     remove_tags.append(dict(name = 'div', attrs = {'class': 'box top-item'}))
  47.  
  48.     remove_tags.append(dict(name = 'div', attrs = {'class': 'column-200 column-margin-430'}))
  49.  
  50.     remove_tags.append(dict(name = 'div', attrs = {'id':
  51. 'detail-related'}))
  52.  
  53.     remove_tags.append(dict(name = 'div', attrs = {'id': 'related'}))
  54.  
  55.     remove_tags.append(dict(name = 'id', attrs = {'class': 'footer'}))
  56.  
  57.     remove_tags.append(dict(name = "ul",attrs =
  58. {'id':'banner-highlights-images'}))
  59.