mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
remove some broken recipes
This commit is contained in:
parent
c7fc794a08
commit
c4b92cebda
Binary file not shown.
Before Width: | Height: | Size: 739 B |
Binary file not shown.
Before Width: | Height: | Size: 542 B |
@ -1,20 +0,0 @@
|
||||
from calibre.web.feeds.news import BasicNewsRecipe
|
||||
|
||||
|
||||
class SpidersWeb(BasicNewsRecipe):
|
||||
title = u"Spider's Web"
|
||||
oldest_article = 7
|
||||
__author__ = 'fenuks'
|
||||
description = u'Autorskie teksty popularnych blogerów, testy sprzętu i aplikacji, oraz wiele więcej.'
|
||||
cover_url = 'http://www.spidersweb.pl/wp-content/themes/new_sw/images/spidersweb.png'
|
||||
category = 'IT, WEB'
|
||||
language = 'pl'
|
||||
no_stylesheers = True
|
||||
remove_javascript = True
|
||||
use_embedded_content = False
|
||||
max_articles_per_feed = 100
|
||||
keep_only_tags = [dict(id='start')]
|
||||
remove_tags_after = dict(attrs={'class': 'padding20'})
|
||||
remove_tags = [dict(name='div', attrs={
|
||||
'class': ['padding border-bottom', 'padding20', 'padding border-top']})]
|
||||
feeds = [(u'Wpisy', u'http://www.spidersweb.pl/feed')]
|
@ -1,75 +0,0 @@
|
||||
#!/usr/bin/env python2
|
||||
|
||||
__license__ = 'GPL v3'
|
||||
__copyright__ = 'teepel 2012'
|
||||
|
||||
'''
|
||||
sport.pl
|
||||
'''
|
||||
|
||||
from calibre.web.feeds.news import BasicNewsRecipe
|
||||
|
||||
|
||||
class sport_pl(BasicNewsRecipe):
|
||||
title = 'Sport.pl'
|
||||
__author__ = 'teepel <teepel44@gmail.com>'
|
||||
language = 'pl'
|
||||
description = u'Największy portal sportowy w Polsce. Wiadomości sportowe z najważniejszych wydarzeń, relacje i wyniki meczów na żywo.'
|
||||
masthead_url = 'http://press.gazeta.pl/file/mediakit/154509/c8/sportpl.jpg'
|
||||
oldest_article = 1
|
||||
max_articles_per_feed = 100
|
||||
remove_javascript = True
|
||||
no_stylesheets = True
|
||||
remove_empty_feeds = True
|
||||
ignore_duplicate_articles = {'title', 'url'}
|
||||
keep_only_tags = []
|
||||
keep_only_tags.append(dict(name='div', attrs={'id': 'article'}))
|
||||
|
||||
remove_tags = []
|
||||
remove_tags.append(dict(name='a', attrs={'href': 'www.gazeta.pl'}))
|
||||
|
||||
feeds = [
|
||||
(u'Wszystkie wiadomości', u'http://rss.gazeta.pl/pub/rss/sport.xml'),
|
||||
(u'Piłka nożna',
|
||||
u'http://www.sport.pl/pub/rss/sport/pilka_nozna.htm'),
|
||||
(u'F1', u'http://www.sport.pl/pub/rss/sportf1.htm'),
|
||||
(u'Tenis', u'http://serwisy.gazeta.pl/pub/rss/tenis.htm'),
|
||||
(u'Siatkówka', u'http://gazeta.pl.feedsportal.com/c/32739/f/611628/index.rss'),
|
||||
(u'Koszykówka', u'http://gazeta.pl.feedsportal.com/c/32739/f/611647/index.rss'),
|
||||
(u'Piłka ręczna',
|
||||
u'http://gazeta.pl.feedsportal.com/c/32739/f/611635/index.rss'),
|
||||
(u'Inne sporty', u'http://gazeta.pl.feedsportal.com/c/32739/f/611649/index.rss'),
|
||||
]
|
||||
|
||||
def parse_feeds(self):
|
||||
feeds = BasicNewsRecipe.parse_feeds(self)
|
||||
for feed in feeds:
|
||||
for article in feed.articles[:]:
|
||||
if '[ZDJĘCIA]' in article.title:
|
||||
article.title = article.title.replace('[ZDJĘCIA]', '')
|
||||
elif '[WIDEO]' in article.title:
|
||||
article.title = article.title.replace('[WIDEO]', '')
|
||||
return feeds
|
||||
|
||||
def print_version(self, url):
|
||||
if 'feedsportal' in url:
|
||||
segment = url.split('/')
|
||||
urlPart = segment[-2]
|
||||
urlPart = urlPart.replace('0L0Ssport0Bpl0C', '')
|
||||
urlPart = urlPart.replace('0C10H', '/')
|
||||
urlPart = urlPart.replace('0H', ',')
|
||||
urlPart = urlPart.replace('0I', '_')
|
||||
urlPart = urlPart.replace('A', '')
|
||||
segment1 = urlPart.split('/')
|
||||
seg1 = segment1[0]
|
||||
seg2 = segment1[1]
|
||||
segment2 = seg2.split(',')
|
||||
part = segment2[0] + ',' + segment2[1]
|
||||
return 'http://www.sport.pl/' + seg1 + '/2029020,' + part + '.html'
|
||||
else:
|
||||
segment = url.split('/')
|
||||
part2 = segment[-2]
|
||||
part1 = segment[-1]
|
||||
segment2 = part1.split(',')
|
||||
part = segment2[1] + ',' + segment2[2]
|
||||
return 'http://www.sport.pl/' + part2 + '/2029020,' + part + '.html'
|
Loading…
x
Reference in New Issue
Block a user