mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 02:34:06 -04:00
MobileBulgaria by Martin Tsanchev
This commit is contained in:
parent
ea50efb4f5
commit
992bf4b423
@ -5,6 +5,7 @@ class AdvancedUserRecipe1341650280(BasicNewsRecipe):
|
|||||||
|
|
||||||
title = u'Empire Magazine'
|
title = u'Empire Magazine'
|
||||||
description = 'Author D.Asbury. Film articles from Empire Mag. '
|
description = 'Author D.Asbury. Film articles from Empire Mag. '
|
||||||
|
language = 'en'
|
||||||
__author__ = 'Dave Asbury'
|
__author__ = 'Dave Asbury'
|
||||||
# last updated 7/7/12
|
# last updated 7/7/12
|
||||||
remove_empty_feeds = True
|
remove_empty_feeds = True
|
||||||
@ -15,7 +16,7 @@ class AdvancedUserRecipe1341650280(BasicNewsRecipe):
|
|||||||
cover_url = 'http://www.empireonline.com/images/magazine/cover.jpg'
|
cover_url = 'http://www.empireonline.com/images/magazine/cover.jpg'
|
||||||
conversion_options = {
|
conversion_options = {
|
||||||
'linearize_tables' : True,
|
'linearize_tables' : True,
|
||||||
}
|
}
|
||||||
#auto_cleanup = True
|
#auto_cleanup = True
|
||||||
preprocess_regexps = [
|
preprocess_regexps = [
|
||||||
(re.compile(r'<a href="http://twitter.com/share.*?</a>', re.IGNORECASE | re.DOTALL), lambda match: ''),
|
(re.compile(r'<a href="http://twitter.com/share.*?</a>', re.IGNORECASE | re.DOTALL), lambda match: ''),
|
||||||
@ -32,20 +33,20 @@ class AdvancedUserRecipe1341650280(BasicNewsRecipe):
|
|||||||
(re.compile(r'<!-- USER REVIEWS: START -->.*?<!-- USER REVIEWS: END -->', re.IGNORECASE | re.DOTALL), lambda match: '<!-- USER REVIEWS: START --><!-- USER REVIEWS: END -->'),
|
(re.compile(r'<!-- USER REVIEWS: START -->.*?<!-- USER REVIEWS: END -->', re.IGNORECASE | re.DOTALL), lambda match: '<!-- USER REVIEWS: START --><!-- USER REVIEWS: END -->'),
|
||||||
(re.compile(r'Advertisement', re.IGNORECASE | re.DOTALL), lambda match: ''),
|
(re.compile(r'Advertisement', re.IGNORECASE | re.DOTALL), lambda match: ''),
|
||||||
(re.compile(r'<a name="haveyoursay".*?now to have your say.', re.IGNORECASE | re.DOTALL), lambda match: ''),
|
(re.compile(r'<a name="haveyoursay".*?now to have your say.', re.IGNORECASE | re.DOTALL), lambda match: ''),
|
||||||
]
|
]
|
||||||
keep_only_tags = [
|
keep_only_tags = [
|
||||||
# dict(name='h1'),
|
# dict(name='h1'),
|
||||||
# dict(attrs={'class' : 'mediumblack'}),
|
# dict(attrs={'class' : 'mediumblack'}),
|
||||||
]
|
]
|
||||||
remove_tags = [dict(name='td', attrs={'width':'200', 'valign' : 'top'}),
|
remove_tags = [dict(name='td', attrs={'width':'200', 'valign' : 'top'}),
|
||||||
dict(name='b'),
|
dict(name='b'),
|
||||||
dict(name='a',attrs={'name' : 'haveyoursay'}),
|
dict(name='a',attrs={'name' : 'haveyoursay'}),
|
||||||
dict(attrs={'class' : 'newslink'}),
|
dict(attrs={'class' : 'newslink'}),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
feeds = [(u'News', u'http://feed43.com/7338478755673147.xml'),
|
feeds = [(u'News', u'http://feed43.com/7338478755673147.xml'),
|
||||||
(u'Recent Features',u'http://feed43.com/4346347750304760.xml'),
|
(u'Recent Features',u'http://feed43.com/4346347750304760.xml'),
|
||||||
(u'Interviews',u'http://feed43.com/3418350077724081.xml'),
|
(u'Interviews',u'http://feed43.com/3418350077724081.xml'),
|
||||||
(u'Film Reviews',u'http://feed43.com/2643703076510627.xml'),
|
(u'Film Reviews',u'http://feed43.com/2643703076510627.xml'),
|
||||||
]
|
]
|
||||||
|
27
recipes/mobile_bulgaria.recipe
Normal file
27
recipes/mobile_bulgaria.recipe
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
from calibre.web.feeds.news import BasicNewsRecipe
|
||||||
|
|
||||||
|
class AdvancedUserRecipe1329123365(BasicNewsRecipe):
|
||||||
|
title = u'Mobilebulgaria.com'
|
||||||
|
__author__ = 'M3 Web'
|
||||||
|
description = 'The biggest Bulgarian site covering mobile consumer electronics. Offers detailed reviews, popular discussion forum, shop and platform for selling new and second hand phones and gadgets.'
|
||||||
|
category = 'News, Reviews, Offers, Forum'
|
||||||
|
oldest_article = 45
|
||||||
|
max_articles_per_feed = 10
|
||||||
|
language = 'bg'
|
||||||
|
encoding = 'windows-1251'
|
||||||
|
no_stylesheets = False
|
||||||
|
remove_javascript = True
|
||||||
|
keep_only_tags = [dict(name='div', attrs={'class':'bigblock'}),
|
||||||
|
dict(name='div', attrs={'class':'verybigblock'}),
|
||||||
|
dict(name='table', attrs={'class':'obiaviresults'}),
|
||||||
|
dict(name='div', attrs={'class':'forumblock'}),
|
||||||
|
dict(name='div', attrs={'class':'forumblock_b1'}),
|
||||||
|
dict(name='div', attrs={'class':'block2_2colswrap'})]
|
||||||
|
|
||||||
|
feeds = [(u'News', u'http://www.mobilebulgaria.com/rss_full.php'),
|
||||||
|
(u'Reviews', u'http://www.mobilebulgaria.com/rss_reviews.php'),
|
||||||
|
(u'Offers', u'http://www.mobilebulgaria.com/obiavi/rss.php'),
|
||||||
|
(u'Forum', u'http://www.mobilebulgaria.com/rss_forum_last10.php')]
|
||||||
|
|
||||||
|
extra_css = '''
|
||||||
|
#gallery1 div{display: block; float: left; margin: 0 10px 10px 0;} '''
|
Loading…
x
Reference in New Issue
Block a user