Update Geopolityka

Merge branch 'master' of https://github.com/t3d/calibre
This commit is contained in:
Kovid Goyal 2017-11-06 09:48:38 +05:30
commit 325055124c
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
7 changed files with 1 additions and 161 deletions

View File

@ -9,4 +9,4 @@ class BasicUserRecipe1361379046(BasicNewsRecipe):
max_articles_per_feed = 100
auto_cleanup = True
feeds = [(u'Rss', u'http://geopolityka.org/index.php?format=feed&type=rss')]
feeds = [(u'Rss', u'http://geopolityka.org/component/k2/itemlist?format=feed&moduleID=200')]

Binary file not shown.

Before

Width:  |  Height:  |  Size: 410 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 410 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 564 B

View File

@ -1,66 +0,0 @@
#!/usr/bin/env python2
__license__ = 'GPL v3'
__copyright__ = u'2010-2015, Tomasz Dlugosz <tomek3d@gmail.com>'
'''
fakty.interia.pl
'''
import re
from calibre.web.feeds.news import BasicNewsRecipe
class InteriaFakty(BasicNewsRecipe):
title = u'Interia.pl - Fakty'
description = u'Fakty ze strony interia.pl'
language = 'pl'
oldest_article = 1
__author__ = u'Tomasz D\u0142ugosz'
no_stylesheets = True
remove_javascript = True
remove_empty_feeds = True
use_embedded_content = False
ignore_duplicate_articles = {'title', 'url'}
feeds = [(u'Kraj', u'http://kanaly.rss.interia.pl/kraj.xml'),
(u'\u015awiat', u'http://kanaly.rss.interia.pl/swiat.xml'),
(u'Wiadomo\u015bci dnia',
u'http://kanaly.rss.interia.pl/fakty.xml'),
(u'Przegl\u0105d prasy',
u'http://kanaly.rss.interia.pl/przeglad_prasy.xml'),
(u'Wywiady', u'http://kanaly.rss.interia.pl/wywiady.xml'),
(u'Ciekawostki', u'http://kanaly.rss.interia.pl/ciekawostki.xml')]
keep_only_tags = [
dict(name='h1'),
dict(name='div', attrs={'class': ['lead textContent fontSize-medium', 'text textContent fontSize-medium', 'source']})]
remove_tags = [
dict(name='div', attrs={'class': ['embed embedAd', 'REMOVE', 'boxHeader']})]
preprocess_regexps = [
(re.compile(i[0], re.IGNORECASE | re.DOTALL), i[1]) for i in
[
(r'embed embed(Left|Right|Center) articleEmbed(Audio|Wideo articleEmbedVideo|ArticleFull|ArticleTitle|ArticleListTitle|AlbumHorizontal)">', lambda match: 'REMOVE">'), # noqa
(r'</div> <div class="source">', lambda match: ''),
(r'<p><a href="http://forum.interia.pl.*?</a></p>', lambda match: '')
]
]
def get_article_url(self, article):
link = article.get('link', None)
if link and 'galerie' not in link and link.split('/')[-1] == "story01.htm":
link = link.split('/')[-2]
encoding = {'0B': '.', '0C': '/', '0A': '0', '0F': '=', '0G': '&',
'0D': '?', '0E': '-', '0H': ',', '0I': '_', '0N': '.com', '0L': 'http://'}
for k, v in encoding.iteritems():
link = link.replace(k, v)
return link
def print_version(self, url):
chunks = url.split(',')
return chunks[0] + '/podglad-wydruku' + ',' + ','.join(chunks[1:])
extra_css = '''
h1 { font-size:130% }
div.info { font-style:italic; font-size:70%}
'''

View File

@ -1,66 +0,0 @@
#!/usr/bin/env python2
__license__ = 'GPL v3'
__copyright__ = u'2010-2013, Tomasz Dlugosz <tomek3d@gmail.com>'
'''
sport.interia.pl
'''
import re
from calibre.web.feeds.news import BasicNewsRecipe
class InteriaSport(BasicNewsRecipe):
title = u'Interia.pl - Sport'
description = u'Sport ze strony interia.pl'
language = 'pl'
oldest_article = 1
__author__ = u'Tomasz D\u0142ugosz'
no_stylesheets = True
remove_javascript = True
remove_empty_feeds = True
use_embedded_content = False
ignore_duplicate_articles = {'title', 'url'}
feeds = [(u'Wydarzenia sportowe', u'http://kanaly.rss.interia.pl/sport.xml'),
(u'Pi\u0142ka no\u017cna',
u'http://kanaly.rss.interia.pl/pilka_nozna.xml'),
(u'Koszyk\xf3wka', u'http://kanaly.rss.interia.pl/koszykowka.xml'),
(u'Tenis', u'http://kanaly.rss.interia.pl/tenis.xml')]
keep_only_tags = [
dict(name='h1'),
dict(name='div', attrs={'class': ['lead textContent', 'text textContent', 'source']})]
remove_tags = [
dict(name='div', attrs={'class': ['embed embedAd', 'REMOVE', 'boxHeader']})]
preprocess_regexps = [
(re.compile(i[0], re.IGNORECASE | re.DOTALL), i[1]) for i in
[
(r'<p><a href.*?</a></p>', lambda match: ''),
(r'<p>(<i>)?<b>(ZOBACZ|CZYTAJ) T.*?</div>', lambda match: '</div>'),
(r'embed embed(Left|Right|Center) articleEmbed(Audio|Wideo articleEmbedVideo|ArticleFull|ArticleTitle|ArticleListTitle|AlbumHorizontal)">', lambda match: 'REMOVE">'), # noqa
(r'</div> <div class="source">', lambda match: ''),
(r'<p><a href="http://forum.interia.pl.*?</a></p>', lambda match: '')
]
]
def get_article_url(self, article):
link = article.get('link', None)
if link and 'galerie' not in link and link.split('/')[-1] == "story01.htm":
link = link.split('/')[-2]
encoding = {'0B': '.', '0C': '/', '0A': '0', '0F': '=', '0G': '&',
'0D': '?', '0E': '-', '0H': ',', '0I': '_', '0N': '.com', '0L': 'http://'}
for k, v in encoding.iteritems():
link = link.replace(k, v)
return link
def print_version(self, url):
chunks = url.split(',')
return chunks[0] + '/podglad-wydruku' + ',' + ','.join(chunks[1:])
extra_css = '''
h1 { font-size:130% }
div.info { font-style:italic; font-size:70%}
'''

View File

@ -1,28 +0,0 @@
__license__ = 'GPL v3'
__copyright__ = 'MrStefan'
'''
www.ittechblog.pl
'''
from calibre.web.feeds.news import BasicNewsRecipe
class ittechblog(BasicNewsRecipe):
title = u'IT techblog'
__author__ = 'MrStefan <mrstefaan@gmail.com>'
language = 'pl'
description = u'Na naszym blogu technologicznym znajdziesz między innymi: testy sprzętu, najnowsze startupy, technologiczne nowinki, felietony tematyczne.'
extra_css = '.cover > img {display:block;}'
remove_empty_feeds = True
oldest_article = 7
max_articles_per_feed = 100
remove_javascript = True
no_stylesheets = True
use_embedded_content = False
keep_only_tags = [dict(attrs={'class': 'box'})]
remove_tags = [dict(name='aside'), dict(
attrs={'class': ['tags', 'counter', 'twitter-share-button']})]
feeds = [(u'Artykuły', u'http://feeds.feedburner.com/ITTechBlog?format=xml')]