mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Merge branch 'master' of https://github.com/t3d/calibre
This commit is contained in:
commit
01ccce815b
19
recipes/dziennikzwiazkowy.recipe
Normal file
19
recipes/dziennikzwiazkowy.recipe
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
from calibre.web.feeds.news import BasicNewsRecipe
|
||||||
|
class Informacje_USA(BasicNewsRecipe):
|
||||||
|
title = u'Dziennik Związkowy'
|
||||||
|
oldest_article = 7
|
||||||
|
max_articles_per_feed = 100
|
||||||
|
__author__ = 'fenuks & Tomasz Długosz'
|
||||||
|
description = u'Najstarsza polskojęzyczna gazeta codzienna w USA'
|
||||||
|
category = 'news'
|
||||||
|
language = 'pl'
|
||||||
|
cover_url='http://dziennikzwiazkowy.com/wp-content/uploads/2014/08/LogoDZPDN1.png'
|
||||||
|
no_stylesheets = True
|
||||||
|
use_embedded_content = False
|
||||||
|
keep_only_tags=[dict(name='div', attrs={'class':'panel'})]
|
||||||
|
remove_tags= [dict(name='div', attrs={'class':['social-buttons left','video-carousel','p-title','article-foot','comments-block']}),dict(attrs={'id':['writecomment','blueimp-gallery']})]
|
||||||
|
feeds = [(u'Informacje', u'http://dziennikzwiazkowy.com/feed/')]
|
||||||
|
|
||||||
|
extra_css = '''
|
||||||
|
h1 { font-size:130% }
|
||||||
|
'''
|
BIN
recipes/icons/dziennikzwiazkowy.png
Normal file
BIN
recipes/icons/dziennikzwiazkowy.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 773 B |
Binary file not shown.
Before Width: | Height: | Size: 523 B |
@ -1,16 +0,0 @@
|
|||||||
from calibre.web.feeds.news import BasicNewsRecipe
|
|
||||||
class Informacje_USA(BasicNewsRecipe):
|
|
||||||
title = u'Informacje USA'
|
|
||||||
oldest_article = 7
|
|
||||||
max_articles_per_feed = 100
|
|
||||||
__author__ = 'fenuks'
|
|
||||||
description = u'portal wiadomości amerykańskich'
|
|
||||||
category = 'news'
|
|
||||||
language = 'pl'
|
|
||||||
cover_url='http://www.informacjeusa.com/wp-content/uploads/2013/01/V3BANNER420-90new.jpg'
|
|
||||||
no_stylesheets = True
|
|
||||||
use_embedded_content = False
|
|
||||||
keep_only_tags=[dict(id='post-area')]
|
|
||||||
remove_tags_after= dict(id='content-area')
|
|
||||||
remove_tags= [dict(attrs={'class':['breadcrumb']}), dict(id=['social-box', 'social-box-vert'])]
|
|
||||||
feeds = [(u'Informacje', u'http://www.informacjeusa.com/feed/')]
|
|
@ -5,29 +5,21 @@ from calibre.ebooks.BeautifulSoup import BeautifulSoup
|
|||||||
class Konflikty(BasicNewsRecipe):
|
class Konflikty(BasicNewsRecipe):
|
||||||
title = u'Konflikty Zbrojne'
|
title = u'Konflikty Zbrojne'
|
||||||
__author__ = 'fenuks'
|
__author__ = 'fenuks'
|
||||||
cover_url = 'http://www.konflikty.pl/images/tapety_logo.jpg'
|
cover_url = 'http://konflikty.pl/wp-content/uploads/2014/07/konflikty.pl-logo.png'
|
||||||
language = 'pl'
|
language = 'pl'
|
||||||
description = u'Zbiór ciekawych artykułów historycznych, militarnych oraz recenzji książek, gier i filmów. Najświeższe informacje o lotnictwie, wojskach lądowych i polityce.'
|
description = u'Zbiór ciekawych artykułów historycznych, militarnych oraz recenzji książek, gier i filmów. Najświeższe informacje o lotnictwie, wojskach lądowych i polityce.'
|
||||||
category='military, history'
|
category='military, history'
|
||||||
oldest_article = 7
|
oldest_article = 7
|
||||||
max_articles_per_feed = 100
|
max_articles_per_feed = 100
|
||||||
no_stylesheets = True
|
no_stylesheets = True
|
||||||
keep_only_tags=[dict(attrs={'class':['title1', 'image']}), dict(id='body')]
|
keep_only_tags=[
|
||||||
|
dict(name='h1'),
|
||||||
|
dict(name='div', attrs={'id': 'page-content'})]
|
||||||
|
|
||||||
feeds = [(u'Aktualności', u'http://www.konflikty.pl/rss_aktualnosci_10.xml'),
|
remove_tags = [dict(name='aside'),dict(name='p', attrs={'id': 'breadcrumbs'}),dict(name='div', attrs={'class':['tags clearfix','post-tags clearfix','post-nav section-container clearfix','about-author section-container clearfix vcard','post-related section-container clearfix',]}),dict(name='div',attrs={'id':'disqus_thread'})]
|
||||||
(u'Historia', u'http://www.konflikty.pl/rss_historia_10.xml'),
|
|
||||||
(u'Militaria', u'http://www.konflikty.pl/rss_militaria_10.xml'),
|
|
||||||
(u'Relacje', u'http://www.konflikty.pl/rss_relacje_10.xml'),
|
|
||||||
(u'Recenzje', u'http://www.konflikty.pl/rss_recenzje_10.xml'),
|
|
||||||
(u'Teksty źródłowe', u'http://www.konflikty.pl/rss_tekstyzrodlowe_10.xml')]
|
|
||||||
|
|
||||||
def preprocess_html(self, soup):
|
feeds = [(u'Konflikty Zbrojne', u'http://www.konflikty.pl/feed')]
|
||||||
for item in soup.findAll(style=True):
|
|
||||||
del item['style']
|
extra_css = '''
|
||||||
for image in soup.findAll(name='a', attrs={'class':'image'}):
|
h1 { font-size:130% }
|
||||||
image['style'] = 'width: 210px; float: left; margin-right:5px;'
|
'''
|
||||||
if image.img and image.img.has_key('alt'):
|
|
||||||
image.name='div'
|
|
||||||
pos = len(image.contents)
|
|
||||||
image.insert(pos, BeautifulSoup('<p style="font-style:italic;">'+image.img['alt']+'</p>'))
|
|
||||||
return soup
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user