mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
remove duplicate class field definition (manual)
ruff 'PIE794'
This commit is contained in:
parent
8dfbcaa057
commit
fb0a290127
@ -21,7 +21,8 @@ quote-style = 'single'
|
||||
|
||||
[tool.ruff.lint]
|
||||
ignore = ['E402', 'E722', 'E741']
|
||||
select = ['E', 'F', 'I', 'W', 'INT']
|
||||
select = ['E', 'F', 'I', 'W', 'INT', 'PIE794']
|
||||
unfixable = ['PIE794']
|
||||
|
||||
[tool.ruff.lint.per-file-ignores]
|
||||
"src/calibre/ebooks/unihandecode/*codepoints.py" = ['E501']
|
||||
|
@ -25,7 +25,6 @@ class afr(BasicNewsRecipe):
|
||||
timefmt = ' [%d %b %Y]'
|
||||
max_articles_per_feed = 25
|
||||
no_stylesheets = True
|
||||
remove_empty_feeds = True
|
||||
remove_attributes = ['style', 'height', 'width']
|
||||
|
||||
keep_only_tags = [
|
||||
|
@ -13,7 +13,6 @@ class AlbertMohlersBlog(BasicNewsRecipe):
|
||||
auto_cleanup = True
|
||||
cover_url = 'http://www.albertmohler.com/wp-content/themes/albert-mohler-v5/img/logo-am-lg.gif'
|
||||
publisher = 'Albert Mohler'
|
||||
language = 'en'
|
||||
author = 'Albert Mohler'
|
||||
|
||||
feeds = [(u"Albert Mohler's Blog",
|
||||
|
@ -21,7 +21,6 @@ class WwwAltomdata_dk(BasicNewsRecipe):
|
||||
resolve_internal_links = True
|
||||
remove_empty_feeds = True
|
||||
auto_cleanup = True
|
||||
language = 'da'
|
||||
|
||||
feeds = [
|
||||
('Alt om DATA, Datatid TechLife', 'http://www.altomdata.dk/feed'),
|
||||
|
@ -19,8 +19,6 @@ class AmericanProspect(BasicNewsRecipe):
|
||||
|
||||
use_embedded_content = False
|
||||
|
||||
no_stylesheets = True
|
||||
|
||||
keep_only_tags = [
|
||||
dict(id=['title', 'content']),
|
||||
]
|
||||
|
@ -18,8 +18,6 @@ class Arbetaren_SE(BasicNewsRecipe):
|
||||
encoding = 'utf-8'
|
||||
language = 'sv'
|
||||
auto_cleanup = True
|
||||
auto_cleanup_keep = '//div[@class="thumbnail"]'
|
||||
auto_cleanup_keep = '//div[@id="article-image"]'
|
||||
auto_cleanup_keep = '//div[@id="article-image"]|//span[@class="important"]'
|
||||
auto_cleanup_keep = '//div[@class="thumbnail"]|//div[@id="article-image"]|//span[@class="important"]'
|
||||
|
||||
feeds = [(u'Nyheter', u'https://www.arbetaren.se/feed')]
|
||||
|
@ -25,7 +25,6 @@ class bergfreunde_blog(BasicNewsRecipe):
|
||||
__author__ = 'VoHe'
|
||||
no_stylesheets = True
|
||||
remove_javascript = True
|
||||
remove_javascript = True
|
||||
remove_empty_feeds = True
|
||||
ignore_duplicate_articles = {'title', 'url'}
|
||||
|
||||
|
@ -15,8 +15,6 @@ class BusinessStandardPrint(BasicNewsRecipe):
|
||||
language = 'en_IN'
|
||||
masthead_url = 'https://bsmedia.business-standard.com/include/_mod/site/html5/images/business-standard-logo.png'
|
||||
encoding = 'utf-8'
|
||||
resolve_internal_links = True
|
||||
remove_empty_feeds = True
|
||||
|
||||
no_stylesheets = True
|
||||
remove_javascript = True
|
||||
|
@ -10,7 +10,6 @@ class AdvancedUserRecipe1283848012(BasicNewsRecipe):
|
||||
language = 'he'
|
||||
__author__ = 'marbs'
|
||||
extra_css = 'img {max-width:100%;} body{direction: rtl;},title{direction: rtl; } ,article_description{direction: rtl; }, a.article{direction: rtl; } ,calibre_feed_description{direction: rtl; }' # noqa: E501
|
||||
simultaneous_downloads = 5
|
||||
remove_javascript = True
|
||||
timefmt = '[%a, %d %b, %Y]'
|
||||
oldest_article = 1
|
||||
@ -23,7 +22,6 @@ class AdvancedUserRecipe1283848012(BasicNewsRecipe):
|
||||
dict(name='div', attrs={'class': 'ArticleBodyComponent'}),
|
||||
]
|
||||
remove_tags = [dict(name='p', attrs={'text': [' ']})]
|
||||
max_articles_per_feed = 100
|
||||
preprocess_regexps = [
|
||||
(re.compile(r'<p> </p>', re.DOTALL | re.IGNORECASE), lambda match: '')
|
||||
]
|
||||
|
@ -4,7 +4,6 @@ from calibre.web.feeds.news import BasicNewsRecipe
|
||||
class AdvancedUserRecipe1271446252(BasicNewsRecipe):
|
||||
title = u'CanardPC'
|
||||
oldest_article = 7
|
||||
max_articles_per_feed = 100
|
||||
language = 'fr'
|
||||
__author__ = 'zorgluf'
|
||||
max_articles_per_feed = 25
|
||||
|
@ -31,7 +31,6 @@ class CBN(BasicNewsRecipe):
|
||||
remove_javascript = True
|
||||
use_embedded_content = False
|
||||
no_stylesheets = True
|
||||
language = 'en'
|
||||
encoding = 'iso-8859-1'
|
||||
conversion_options = {'linearize_tables': True}
|
||||
|
||||
|
@ -9,7 +9,6 @@ class ChristianPost(BasicNewsRecipe):
|
||||
__author__ = 'sexymax15'
|
||||
description = 'Homepage'
|
||||
language = 'en'
|
||||
no_stylesheets = True
|
||||
use_embedded_content = False
|
||||
oldest_article = 30
|
||||
max_articles_per_feed = 15
|
||||
|
@ -12,7 +12,6 @@ class Colta(BasicNewsRecipe):
|
||||
publisher = 'OpenSpace.ru'
|
||||
category = 'news'
|
||||
cover_url = u'http://www.colta.ru/assets/logo-afb684c3d35fc1f6f103f9fb638c8ec1.png'
|
||||
language = 'ru'
|
||||
no_stylesheets = True
|
||||
remove_javascript = True
|
||||
|
||||
|
@ -7,7 +7,6 @@ class AdvancedUserRecipe1316944753(BasicNewsRecipe):
|
||||
language = 'en'
|
||||
description = 'From science fiction enthusiasts through to gaming fanatics, Den of Geek has become the one-stop UK website for people genuinely passionate about their entertainment media. Den of Geek covers popular culture but always with an edgy, UK centric slant that sets it apart from the crowd.' # noqa: E501
|
||||
category = 'Movies, TV, Games, Comics, Cult, News, Reviews'
|
||||
language = 'en'
|
||||
|
||||
oldest_article = 7
|
||||
max_articles_per_feed = 100
|
||||
|
@ -18,12 +18,10 @@ class Descopera(BasicNewsRecipe):
|
||||
oldest_article = 5
|
||||
language = 'ro'
|
||||
max_articles_per_feed = 100
|
||||
no_stylesheets = True
|
||||
use_embedded_content = False
|
||||
category = 'Ziare,Reviste,Descopera'
|
||||
encoding = 'utf-8'
|
||||
cover_url = 'http://www.descopera.ro/images/header_images/logo.gif'
|
||||
use_embedded_content = False
|
||||
|
||||
no_stylesheets = True
|
||||
auto_cleanup = True
|
||||
|
@ -11,7 +11,6 @@ class DesiringGodEnglish(BasicNewsRecipe):
|
||||
|
||||
cover_url = 'http://cdn0.desiringgod.org/images/layout/breadcrumbs_dg_mark.png'
|
||||
masthead_url = 'http://cdn0.desiringgod.org/images/layout/breadcrumbs_dg_mark.png'
|
||||
language = 'en'
|
||||
oldest_article = 7
|
||||
max_articles_per_feed = 50
|
||||
auto_cleanup = True
|
||||
|
@ -11,8 +11,6 @@ class DeutscheWelle(BasicNewsRecipe):
|
||||
max_articles_per_feed = 200
|
||||
no_stylesheets = True
|
||||
remove_javascript = True
|
||||
no_stylesheets = True
|
||||
remove_javascript = True
|
||||
remove_empty_feeds = True
|
||||
ignore_duplicate_articles = {'title', 'url'}
|
||||
remove_attributes = ['height', 'width', 'style']
|
||||
|
@ -15,7 +15,7 @@ class Dobreprogramy_pl(BasicNewsRecipe):
|
||||
index = 'http://www.dobreprogramy.pl/'
|
||||
no_stylesheets = True
|
||||
language = 'pl'
|
||||
extra_css = '.title {font-size:22px;}'
|
||||
extra_css = '.title {font-size:22px;}, h1 { font-size:130% }'
|
||||
oldest_article = 8
|
||||
max_articles_per_feed = 100
|
||||
remove_attrs = ['style', 'width', 'height']
|
||||
@ -41,7 +41,3 @@ class Dobreprogramy_pl(BasicNewsRecipe):
|
||||
if not r.string:
|
||||
r.extract()
|
||||
return soup
|
||||
|
||||
extra_css = '''
|
||||
h1 { font-size:130% }
|
||||
'''
|
||||
|
@ -121,7 +121,7 @@ class econ_search(BasicNewsRecipe):
|
||||
'Use the Advanced section of the recipe to search.'
|
||||
)
|
||||
|
||||
remove_attributes = ['style', 'height', 'width']
|
||||
remove_attributes = ['data-reactid', 'style', 'height', 'width']
|
||||
no_stylesheets = True
|
||||
ignore_duplicate_articles = {'url'}
|
||||
extra_css = '''
|
||||
@ -154,8 +154,6 @@ class econ_search(BasicNewsRecipe):
|
||||
)
|
||||
]
|
||||
keep_only_tags = [dict(name='article', id=lambda x: not x)]
|
||||
no_stylesheets = True
|
||||
remove_attributes = ['data-reactid', 'width', 'height']
|
||||
# economist.com has started throttling after about 60% of the total has
|
||||
# downloaded with connection reset by peer (104) errors.
|
||||
delay = 3
|
||||
|
@ -9,8 +9,10 @@ class AdvancedUserRecipe1311790237(BasicNewsRecipe):
|
||||
language = 'es_CO'
|
||||
cover_url = 'http://www.elcolombiano.com/images/logoElColombiano348x46.gif'
|
||||
remove_tags_before = dict(id='contenidoArt')
|
||||
remove_tags_after = dict(id='enviaTips')
|
||||
remove_tags_after = dict(id='zonaPata')
|
||||
remove_tags_after = [
|
||||
dict(id='enviaTips'),
|
||||
dict(id='zonaPata'),
|
||||
]
|
||||
oldest_article = 1
|
||||
max_articles_per_feed = 100
|
||||
remove_javascript = True
|
||||
|
@ -18,7 +18,6 @@ class elcorreo(BasicNewsRecipe):
|
||||
ignore_duplicate_articles = {'url'}
|
||||
encoding = 'utf-8'
|
||||
masthead_url = 'https://s1.ppllstatics.com/starfish/1.3.76/assets/images/logos/logo-elcorreo.svg'
|
||||
encoding = 'utf-8'
|
||||
remove_empty_feeds = True
|
||||
resolve_internal_links = True
|
||||
max_articles_per_feed = 25 # articles
|
||||
@ -88,14 +87,6 @@ class elcorreo(BasicNewsRecipe):
|
||||
p.name = 'div'
|
||||
return soup
|
||||
|
||||
recipe_specific_options = {
|
||||
'days': {
|
||||
'short': 'Oldest article to download from this news source. In days ',
|
||||
'long': 'For example, 0.5, gives you articles from the past 12 hours',
|
||||
'default': str(oldest_article)
|
||||
}
|
||||
}
|
||||
|
||||
def get_browser(self, *args, **kwargs):
|
||||
kwargs['user_agent'] = 'Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)'
|
||||
br = BasicNewsRecipe.get_browser(self, *args, **kwargs)
|
||||
|
@ -13,7 +13,10 @@ class ESO(BasicNewsRecipe):
|
||||
remove_empty_feeds = True
|
||||
use_embedded_content = False
|
||||
cover_url = 'https://www.eso.org/public/archives/logos/medium/eso-logo-black-outline.jpg'
|
||||
keep_only_tags = [dict(attrs={'class': 'subcl'})]
|
||||
keep_only_tags = [
|
||||
dict(attrs={'class': 'subcl'}),
|
||||
dict(name='div',attrs={'class':'col-md-9 left-column'}),
|
||||
]
|
||||
remove_tags = [dict(id='lang_row'), dict(
|
||||
attrs={'class': ['pr_typeid', 'pr_news_feature_link', 'outreach_usage', 'hidden']})]
|
||||
feeds = [
|
||||
@ -21,9 +24,6 @@ class ESO(BasicNewsRecipe):
|
||||
(u'Og\u0142oszenia', u'http://www.eso.org/public/poland/announcements/feed/'),
|
||||
(u'Zdj\u0119cie tygodnia', u'http://www.eso.org/public/poland/images/potw/feed/')]
|
||||
|
||||
keep_only_tags = [
|
||||
dict(name='div',attrs={'class':'col-md-9 left-column'})]
|
||||
|
||||
def preprocess_html(self, soup):
|
||||
for a in soup.findAll('a', href=True):
|
||||
if a['href'].startswith('/'):
|
||||
|
@ -13,7 +13,6 @@ class FairbanksDailyNewsminer(BasicNewsRecipe):
|
||||
remove_javascript = True
|
||||
use_embedded_content = False
|
||||
no_stylesheets = True
|
||||
language = 'en'
|
||||
encoding = 'utf8'
|
||||
conversion_options = {'linearize_tables': True}
|
||||
auto_cleanup = True
|
||||
|
@ -108,8 +108,7 @@ class FazNet(BasicNewsRecipe):
|
||||
scale_news_images = (10,100)
|
||||
delay = 1
|
||||
|
||||
test_article = 'https://www.faz.net/rss/aktuell/feuilleton/kunst-und-architektur/berlinische-galerie-zeigt-edvard-munch-die-ganze-gefuehlsskala-des-lebens-19180631.html?printPagedArticle=true#pageIndex_2'
|
||||
test_article = None
|
||||
test_feed = 'https://www.faz.net/rss/aktuell/feuilleton/kunst-und-architektur/berlinische-galerie-zeigt-edvard-munch-die-ganze-gefuehlsskala-des-lebens-19180631.html?printPagedArticle=true#pageIndex_2'
|
||||
|
||||
extra_css = '''
|
||||
.header-title,.scrolly-title {font-size: 1.5em; font-weight:bold; text-align:left;}
|
||||
|
@ -8,7 +8,6 @@ class AdvancedUserRecipe1716089864(BasicNewsRecipe):
|
||||
description = 'The Blog of Bill Gates.'
|
||||
language = 'en'
|
||||
__author__ = 'Spicy Poison'
|
||||
description = 'The Blog of Bill Gates'
|
||||
publisher = 'Bill Gates'
|
||||
oldest_article = 30
|
||||
max_articles_per_feed = 50
|
||||
|
@ -11,7 +11,6 @@ class GlasgowHerald(BasicNewsRecipe):
|
||||
title = u'Glasgow Herald'
|
||||
oldest_article = 1
|
||||
max_articles_per_feed = 100
|
||||
no_stylesheets = True
|
||||
language = 'en_GB'
|
||||
|
||||
__author__ = 'Kovid Goyal'
|
||||
|
@ -29,9 +29,8 @@ class AdvancedUserRecipe1287519083(BasicNewsRecipe):
|
||||
remove_tags_before = dict(id='modul_artikel')
|
||||
remove_tags_after = dict(id='articlecontent')
|
||||
|
||||
remove_tags = dict(id='articlesidebar')
|
||||
|
||||
remove_tags = [
|
||||
dict(id='articlesidebar'),
|
||||
dict(name='div', attrs={'class': ['articlecomment',
|
||||
'articlebookmark', 'teaser_anzeige', 'teaser_umfrage',
|
||||
'navigation', 'subnavigation']})
|
||||
|
@ -35,7 +35,6 @@ class Harpers(BasicNewsRecipe):
|
||||
remove_tags = [
|
||||
classes('header-controls')
|
||||
]
|
||||
remove_attributes = ['style', 'width', 'height']
|
||||
|
||||
extra_css = '''
|
||||
img {display:block; margin:0 auto;}
|
||||
|
@ -50,7 +50,7 @@ class HighCountryNews(BasicNewsRecipe):
|
||||
auto_cleanup = False
|
||||
remove_javascript = True
|
||||
remove_empty_feeds = True
|
||||
remove_attributes = ['width', 'height']
|
||||
remove_attributes = ['style', 'width', 'height']
|
||||
use_embedded_content = False
|
||||
|
||||
masthead_url = 'http://www.hcn.org/logo.jpg'
|
||||
@ -69,8 +69,6 @@ class HighCountryNews(BasicNewsRecipe):
|
||||
# caption and credit for description & author of pictures
|
||||
# main-topic
|
||||
|
||||
remove_attributes = ['style']
|
||||
|
||||
extra_css = '''
|
||||
h1 {font-size: 1.6em; text-align: left}
|
||||
h2 {font-size: 1em; font-style: italic; font-weight: normal}
|
||||
|
@ -13,7 +13,6 @@ class hnaDe(BasicNewsRecipe):
|
||||
title = 'HNA'
|
||||
description = 'local news from Hessen/Germany'
|
||||
__author__ = 'Oliver Niesner'
|
||||
use_embedded_content = False
|
||||
language = 'de'
|
||||
use_embedded_content = False
|
||||
timefmt = ' [%d %b %Y]'
|
||||
|
@ -14,7 +14,6 @@ class ingr(BasicNewsRecipe):
|
||||
no_stylesheets = True
|
||||
use_embedded_content = False
|
||||
remove_empty_feeds = True
|
||||
encoding = 'utf8'
|
||||
keep_only_tags = [
|
||||
dict(name='h1'),
|
||||
|
||||
|
@ -30,7 +30,6 @@ class TheIndependentNew(BasicNewsRecipe):
|
||||
publisher = 'The Independent'
|
||||
oldest_article = 2.0
|
||||
ignore_duplicate_articles = {'title', 'url'}
|
||||
remove_empty_feeds = True
|
||||
category = 'news, UK'
|
||||
no_stylesheets = True
|
||||
use_embedded_content = False
|
||||
|
@ -20,8 +20,6 @@ class IndependentAustralia(BasicNewsRecipe):
|
||||
description = (
|
||||
'Independent Australia is a progressive journal focusing on politics, democracy, the environment, Australian history and Australian identity.'
|
||||
' It contains news and opinion from Australia and around the world.')
|
||||
oldest_article = 7 # days
|
||||
max_articles_per_feed = 100
|
||||
|
||||
feeds = [
|
||||
(
|
||||
@ -67,13 +65,6 @@ class IndependentAustralia(BasicNewsRecipe):
|
||||
extra_css = '.byline{font-size:smaller;margin-bottom:10px;}.inline-caption{display:block;font-size:smaller;text-decoration: none;}'
|
||||
compress_news_images = True
|
||||
|
||||
feeds = [
|
||||
(
|
||||
'Independent Australia',
|
||||
'https://feeds.feedburner.com/IndependentAustralia'
|
||||
),
|
||||
]
|
||||
|
||||
# ************************************
|
||||
# Break up feed into categories (based on BrianG's code snippet):
|
||||
# ************************************
|
||||
|
@ -15,7 +15,6 @@ class InquirerNet(BasicNewsRecipe):
|
||||
description = 'News from Philipines'
|
||||
oldest_article = 2
|
||||
max_articles_per_feed = 100
|
||||
no_stylesheets = True
|
||||
use_embedded_content = False
|
||||
encoding = 'utf8'
|
||||
publisher = 'inquirer.net'
|
||||
@ -23,8 +22,6 @@ class InquirerNet(BasicNewsRecipe):
|
||||
lang = 'en'
|
||||
language = 'en'
|
||||
|
||||
use_embedded_content = False
|
||||
|
||||
no_stylesheets = True
|
||||
auto_cleanup = True
|
||||
|
||||
|
@ -25,7 +25,6 @@ class JerusalemPost(BasicNewsRecipe):
|
||||
|
||||
__author__ = 'Kovid Goyal'
|
||||
max_articles_per_feed = 10
|
||||
no_stylesheets = True
|
||||
|
||||
def get_browser(self):
|
||||
return BasicNewsRecipe.get_browser(self, user_agent='common_words/based')
|
||||
|
@ -10,7 +10,6 @@ class Kosmonauta(BasicNewsRecipe):
|
||||
category = 'astronomy'
|
||||
language = 'pl'
|
||||
cover_url = 'http://bi.gazeta.pl/im/4/10393/z10393414X,Kosmonauta-net.jpg'
|
||||
no_stylesheets = True
|
||||
oldest_article = 7
|
||||
no_stylesheets = True
|
||||
remove_javascript = True
|
||||
|
@ -27,7 +27,6 @@ class LeMonde(BasicNewsRecipe):
|
||||
|
||||
oldest_article = 1
|
||||
no_stylesheets = True
|
||||
remove_empty_feeds = True
|
||||
ignore_duplicate_articles = {'title', 'url'}
|
||||
reverse_article_order = True
|
||||
remove_empty_feeds = True
|
||||
|
@ -14,7 +14,6 @@ class LWN(BasicNewsRecipe):
|
||||
__author__ = 'Oliver Niesner'
|
||||
description = 'Linux Weekly News'
|
||||
oldest_article = 54
|
||||
language = _('English')
|
||||
max_articles_per_feed = 100
|
||||
needs_subscription = True
|
||||
language = 'en'
|
||||
|
@ -23,7 +23,6 @@ class czytania_mateusz(BasicNewsRecipe):
|
||||
remove_javascript = True
|
||||
simultaneous_downloads = 2
|
||||
max_articles_per_feed = 100
|
||||
auto_cleanup = True
|
||||
|
||||
feeds = [(u'Czytania', u'http://mateusz.pl/rss/czytania/')]
|
||||
|
||||
|
@ -24,7 +24,6 @@ class ModorosBlogHu(BasicNewsRecipe):
|
||||
remove_empty_feeds = True
|
||||
no_stylesheets = True
|
||||
feeds = [(u'Modoros Blog', u'http://modoros.blog.hu/rss')]
|
||||
remove_javascript = True
|
||||
use_embedded_content = False
|
||||
preprocess_regexps = [
|
||||
(re.compile(r'<!--megosztas -->.*?</body>', re.DOTALL | re.IGNORECASE),
|
||||
|
@ -12,7 +12,6 @@ class MyAppleRecipe(BasicNewsRecipe):
|
||||
description = u' Największy w Polsce serwis zajmujący się tematyką związaną z Apple i wszelkimi produktami tej firmy.'
|
||||
cover_url = ''
|
||||
remove_empty_feeds = True
|
||||
no_stylesheets = True
|
||||
oldest_article = 7
|
||||
max_articles_per_feed = 100000
|
||||
recursions = 0
|
||||
|
@ -7,13 +7,13 @@ from calibre.web.feeds.news import BasicNewsRecipe, classes
|
||||
|
||||
class NatGeo(BasicNewsRecipe):
|
||||
title = 'National Geographic'
|
||||
description = 'News articles from The National Geographic, Download Monthly.'
|
||||
description = ('News articles from The National Geographic, Download Monthly. '
|
||||
'Inspiring people to care about the planet since 1888')
|
||||
language = 'en'
|
||||
encoding = 'utf8'
|
||||
publisher = 'nationalgeographic.com'
|
||||
category = 'science, nat geo'
|
||||
__author__ = 'Kovid Goyal, unkn0wn'
|
||||
description = 'Inspiring people to care about the planet since 1888'
|
||||
timefmt = ' [%a, %d %b, %Y]'
|
||||
no_stylesheets = True
|
||||
use_embedded_content = False
|
||||
|
@ -6,13 +6,13 @@ from calibre.web.feeds.news import BasicNewsRecipe
|
||||
|
||||
class NatGeo(BasicNewsRecipe):
|
||||
title = 'National Geographic Kids'
|
||||
description = 'The National Geographic, an American monthly magazine'
|
||||
description = ('The National Geographic, an American monthly magazine. '
|
||||
'Inspiring people to care about the planet since 1888')
|
||||
language = 'en'
|
||||
encoding = 'utf8'
|
||||
publisher = 'kids.nationalgeographic.com'
|
||||
category = 'science, nat geo'
|
||||
__author__ = 'unkn0wn'
|
||||
description = 'Inspiring people to care about the planet since 1888'
|
||||
timefmt = ' [%a, %d %b, %Y]'
|
||||
use_embedded_content = False
|
||||
remove_javascript = True
|
||||
|
@ -7,13 +7,13 @@ from calibre.web.feeds.news import BasicNewsRecipe, classes
|
||||
|
||||
class NatGeo(BasicNewsRecipe):
|
||||
title = 'National Geographic Traveller'
|
||||
description = 'News articles from The National Geographic Traveller, Download Monthly.'
|
||||
description = ('News articles from The National Geographic Traveller, Download Monthly. '
|
||||
'Inspiring people to care about the planet since 1888')
|
||||
language = 'en'
|
||||
encoding = 'utf8'
|
||||
publisher = 'nationalgeographic.com'
|
||||
category = 'science, nat geo'
|
||||
__author__ = 'unkn0wn'
|
||||
description = 'Inspiring people to care about the planet since 1888'
|
||||
timefmt = ' [%a, %d %b, %Y]'
|
||||
no_stylesheets = True
|
||||
use_embedded_content = False
|
||||
|
@ -5,16 +5,14 @@ from calibre.web.feeds.news import BasicNewsRecipe, classes
|
||||
|
||||
class NatGeo(BasicNewsRecipe):
|
||||
title = 'National Geographic History'
|
||||
description = (
|
||||
'From Caesar to Napoleon, the Pyramids to the Parthenon, the Trojan War to the Civil War—National Geographic '
|
||||
'HISTORY draws readers in with more than 5,000 years of people, places, and things to explore.'
|
||||
)
|
||||
description = ('From Caesar to Napoleon, the Pyramids to the Parthenon, the Trojan War to the Civil War—National Geographic '
|
||||
'HISTORY draws readers in with more than 5,000 years of people, places, and things to explore. '
|
||||
'Inspiring people to care about the planet since 1888')
|
||||
language = 'en'
|
||||
encoding = 'utf8'
|
||||
publisher = 'nationalgeographic.com'
|
||||
category = 'science, nat geo'
|
||||
__author__ = 'Kovid Goyal, unkn0wn'
|
||||
description = 'Inspiring people to care about the planet since 1888'
|
||||
timefmt = ' [%a, %d %b, %Y]'
|
||||
no_stylesheets = True
|
||||
use_embedded_content = False
|
||||
|
@ -8,13 +8,13 @@ from calibre.web.feeds.news import BasicNewsRecipe, classes
|
||||
|
||||
class NatGeo(BasicNewsRecipe):
|
||||
title = 'National Geographic Magazine'
|
||||
description = 'The National Geographic, an American monthly magazine'
|
||||
description = ('The National Geographic, an American monthly magazine. '
|
||||
'Inspiring people to care about the planet since 1888')
|
||||
language = 'en'
|
||||
encoding = 'utf8'
|
||||
publisher = 'nationalgeographic.com'
|
||||
category = 'science, nat geo'
|
||||
__author__ = 'Kovid Goyal, unkn0wn'
|
||||
description = 'Inspiring people to care about the planet since 1888'
|
||||
timefmt = ' [%a, %d %b, %Y]'
|
||||
no_stylesheets = True
|
||||
use_embedded_content = False
|
||||
|
@ -27,7 +27,6 @@ class AdvancedUserRecipe1306061239(BasicNewsRecipe):
|
||||
simultaneous_downloads = 20
|
||||
use_embedded_content = False
|
||||
recursions = 0
|
||||
auto_cleanup = True
|
||||
|
||||
feeds = [
|
||||
(u'NME News', u'http://www.nme.com/news/feed'),
|
||||
|
@ -13,8 +13,10 @@ class AdvancedUserRecipe1329123365(BasicNewsRecipe):
|
||||
no_stylesheets = True
|
||||
remove_javascript = True
|
||||
keep_only_tags = [dict(name='div', attrs={'id': 'content'})]
|
||||
remove_tags = [dict(name='div', attrs={'id': 'text_options'})]
|
||||
remove_tags = [dict(name='div', attrs={'id': 'social_shares_top'})]
|
||||
remove_tags = [
|
||||
dict(name='div', attrs={'id': 'text_options'}),
|
||||
dict(name='div', attrs={'id': 'social_shares_top'}),
|
||||
]
|
||||
remove_tags_after = dict(id='textsize')
|
||||
feeds = [(u'Business', u'http://novinite.bg/rss.php?category_id=1'),
|
||||
(u'Politics', u'http://novinite.bg/rss.php?category_id=2'),
|
||||
|
@ -32,7 +32,6 @@ class NYTimesSports(BasicNewsRecipe):
|
||||
max_articles_per_feed = 25
|
||||
use_embedded_content = False
|
||||
no_stylesheets = True
|
||||
language = 'en'
|
||||
delay = 1
|
||||
|
||||
feeds = [
|
||||
|
@ -13,7 +13,6 @@ class OptyczneRecipe(BasicNewsRecipe):
|
||||
description = u'Najlepsze testy obiektywów, testy aparatów cyfrowych i testy lornetek w sieci!'
|
||||
cover_url = ''
|
||||
remove_empty_feeds = True
|
||||
no_stylesheets = True
|
||||
oldest_article = 7
|
||||
max_articles_per_feed = 100
|
||||
recursions = 0
|
||||
|
@ -20,7 +20,6 @@ class ORF(BasicNewsRecipe):
|
||||
masthead_url = 'https://www.orfonline.org/wp-content/uploads/2015/09/Logo_ORF_JPEG.jpg'
|
||||
remove_attributes = ['style', 'height', 'width']
|
||||
ignore_duplicate_articles = {'url', 'title'}
|
||||
remove_empty_feeds = True
|
||||
oldest_article = 7
|
||||
simultaneous_downloads = 1
|
||||
|
||||
|
@ -20,7 +20,6 @@ class AdvancedUserRecipe1277129332(BasicNewsRecipe):
|
||||
use_embedded_content = False
|
||||
no_stylesheets = True
|
||||
encoding = 'GB2312'
|
||||
language = 'zh'
|
||||
conversion_options = {'linearize_tables': True}
|
||||
masthead_url = 'http://www.people.com.cn/img/2010wb/images/logo.gif'
|
||||
|
||||
|
@ -11,7 +11,6 @@ class ppeRecipe(BasicNewsRecipe):
|
||||
category = u'News'
|
||||
description = u'Portal o konsolach i grach wideo.'
|
||||
extra_css = '.categories > li {list-style: none; display: inline;} .galmini > li {list-style: none; float: left;} .calibre_navbar {clear: both;}'
|
||||
remove_empty_feeds = True
|
||||
no_stylesheets = True
|
||||
oldest_article = 7
|
||||
max_articles_per_feed = 100
|
||||
|
@ -23,7 +23,6 @@ class ReadersDigest(BasicNewsRecipe):
|
||||
oldest_article = 60
|
||||
max_articles_per_feed = 200
|
||||
|
||||
language = 'en'
|
||||
remove_javascript = True
|
||||
remove_attributes = ['style']
|
||||
|
||||
|
@ -14,7 +14,6 @@ class SKAI(BasicNewsRecipe):
|
||||
no_stylesheets = True
|
||||
use_embedded_content = False
|
||||
remove_empty_feeds = True
|
||||
encoding = 'utf8'
|
||||
keep_only_tags = [
|
||||
dict(name='h1'),
|
||||
dict(name='div', attrs={'class': ['articleText']})
|
||||
|
@ -43,7 +43,7 @@ class PrivateEyeRecipe(BasicNewsRecipe):
|
||||
name = 'Oldie Online'
|
||||
series = 'The ' + name
|
||||
now = datetime.now().strftime(' %Y-%m')
|
||||
title = series + now
|
||||
title = series + now # noqa: PIE794
|
||||
title_sort = name + now + ', The'
|
||||
conversion_options = {
|
||||
'authors': 'The Oldie',
|
||||
|
@ -32,7 +32,6 @@ class USAToday(BasicNewsRecipe):
|
||||
timefmt = ' [%d %b %Y]'
|
||||
max_articles_per_feed = 25
|
||||
no_stylesheets = True
|
||||
remove_empty_feeds = True
|
||||
|
||||
keep_only_tags = [
|
||||
classes('gnt_ar_hl gnt_ar_by gnt_ar_b topper__inner in-depth-content'),
|
||||
|
@ -19,7 +19,6 @@ class AdvancedUserRecipe1283848012(BasicNewsRecipe):
|
||||
dict(name='p', attrs={'class': 'subtitle'}),
|
||||
dict(name='p', attrs={'class': 'article_speakable'}),
|
||||
]
|
||||
max_articles_per_feed = 100
|
||||
|
||||
feeds = [
|
||||
(u'חדשות', u'https://rss.walla.co.il/feed/1?type=main'),
|
||||
|
@ -8,9 +8,11 @@ class WozDie(BasicNewsRecipe):
|
||||
language = 'de'
|
||||
|
||||
no_stylesheets = True
|
||||
remove_tags = [dict(name='p', attrs={'class': 'arrow_top'})]
|
||||
remove_tags = [dict(name='p', attrs={'class': 'bottom_right'})]
|
||||
remove_tags = [dict(name='script')]
|
||||
remove_tags = [
|
||||
dict(name='p', attrs={'class': 'arrow_top'}),
|
||||
dict(name='p', attrs={'class': 'bottom_right'}),
|
||||
dict(name='script'),
|
||||
]
|
||||
extra_css = '''#print_titel{vertical-align: bottom; text-align:
|
||||
left; color: #666666; background-color: white; padding-top: 30px; padding-
|
||||
bottom: 10px; border-bottom: 1px solid #999999;} #title{text-align:
|
||||
|
@ -22,7 +22,7 @@ quote-style = 'single'
|
||||
explicit-preview-rules = true
|
||||
ignore = [
|
||||
'E402', 'E722', 'E741',
|
||||
'UP012', 'UP030', 'UP032', 'UP038', 'C413', 'C420', 'PIE790', 'PIE794',
|
||||
'UP012', 'UP030', 'UP032', 'UP038', 'C413', 'C420', 'PIE790',
|
||||
'RUF001', 'RUF002', 'RUF003', 'RUF005', 'RUF012', 'RUF013', 'RUF015', 'RUF031', 'RUF100',
|
||||
'F841', # because in preview, unused tuple unpacking variable that not use dummy syntax (prefix '_' underscore)
|
||||
# raise error 'unused-variable', sigh (https://github.com/astral-sh/ruff/issues/8884)
|
||||
@ -40,6 +40,7 @@ select = [
|
||||
'E111', 'E112', 'E113', 'E117', # code indentation
|
||||
'E114', 'E115', 'E116', 'E261', 'E262', 'E265', # comment formating
|
||||
]
|
||||
unfixable = ['PIE794']
|
||||
|
||||
[lint.per-file-ignores]
|
||||
"recipes/*" = ['UP']
|
||||
|
@ -50,7 +50,6 @@ class MTP_DEVICE(BASE):
|
||||
|
||||
METADATA_CACHE = 'metadata.calibre'
|
||||
DRIVEINFO = 'driveinfo.calibre'
|
||||
CAN_SET_METADATA = []
|
||||
NEWS_IN_FOLDER = True
|
||||
MAX_PATH_LEN = 230
|
||||
THUMBNAIL_HEIGHT = DEFAULT_THUMBNAIL_HEIGHT
|
||||
|
@ -263,7 +263,6 @@ class ViewerBridge(Bridge):
|
||||
search_result_not_found = from_js(object)
|
||||
search_result_discovered = from_js(object)
|
||||
find_next = from_js(object)
|
||||
quit = from_js()
|
||||
update_current_toc_nodes = from_js(object)
|
||||
toggle_full_screen = from_js()
|
||||
report_cfi = from_js(object, object)
|
||||
@ -477,7 +476,6 @@ class WebView(RestartingWebEngineView):
|
||||
new_bookmark = pyqtSignal(object)
|
||||
toggle_inspector = pyqtSignal()
|
||||
toggle_lookup = pyqtSignal(object)
|
||||
quit = pyqtSignal()
|
||||
update_current_toc_nodes = pyqtSignal(object)
|
||||
toggle_full_screen = pyqtSignal()
|
||||
ask_for_open = pyqtSignal(object)
|
||||
|
Loading…
x
Reference in New Issue
Block a user