mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
Update theindiaforum.recipe
This commit is contained in:
parent
aae0ca3b2c
commit
17806d034e
@ -1,3 +1,5 @@
|
||||
#!/usr/bin/env python
|
||||
# vim:fileencoding=utf-8
|
||||
from datetime import datetime, timedelta, timezone
|
||||
|
||||
from calibre.utils.date import parse_date
|
||||
@ -21,6 +23,11 @@ class mains(BasicNewsRecipe):
|
||||
use_embedded_content = False
|
||||
oldest_article = 30 # days
|
||||
masthead_url = 'https://www.theindiaforum.in/themes/the_india_forum/images/tif_logo.png'
|
||||
extra_css = '''
|
||||
[class*="caption"], [class*="references"], #article-author-top-container { font-size:small; }
|
||||
[class*="blurb"] { font-style:italic; }
|
||||
blockquote, em { color:#202020; }
|
||||
'''
|
||||
|
||||
keep_only_tags = [
|
||||
classes('article-lead-container block-views-blockarticle-block-1'),
|
||||
@ -28,6 +35,12 @@ class mains(BasicNewsRecipe):
|
||||
classes('block-field-blocknodearticlebody block-field-blocknodearticlefield-references')
|
||||
]
|
||||
|
||||
remove_tags = [
|
||||
dict(name=['source', 'svg']),
|
||||
dict(attrs={'src':lambda x: x and x.endswith('quote_logo.png')}),
|
||||
classes('s_info')
|
||||
]
|
||||
|
||||
def parse_index(self):
|
||||
soup = self.index_to_soup('https://www.theindiaforum.in/')
|
||||
ul = soup.find('ul', attrs={'class':'float-left'})
|
||||
|
Loading…
x
Reference in New Issue
Block a user