remove duplicate class field definition (manual)

ruff 'PIE794'
This commit is contained in:
un-pogaz 2025-01-24 11:14:22 +01:00
parent 8dfbcaa057
commit fb0a290127
62 changed files with 39 additions and 113 deletions

View File

@ -21,7 +21,8 @@ quote-style = 'single'
[tool.ruff.lint] [tool.ruff.lint]
ignore = ['E402', 'E722', 'E741'] 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] [tool.ruff.lint.per-file-ignores]
"src/calibre/ebooks/unihandecode/*codepoints.py" = ['E501'] "src/calibre/ebooks/unihandecode/*codepoints.py" = ['E501']

View File

@ -25,7 +25,6 @@ class afr(BasicNewsRecipe):
timefmt = ' [%d %b %Y]' timefmt = ' [%d %b %Y]'
max_articles_per_feed = 25 max_articles_per_feed = 25
no_stylesheets = True no_stylesheets = True
remove_empty_feeds = True
remove_attributes = ['style', 'height', 'width'] remove_attributes = ['style', 'height', 'width']
keep_only_tags = [ keep_only_tags = [

View File

@ -13,7 +13,6 @@ class AlbertMohlersBlog(BasicNewsRecipe):
auto_cleanup = True auto_cleanup = True
cover_url = 'http://www.albertmohler.com/wp-content/themes/albert-mohler-v5/img/logo-am-lg.gif' cover_url = 'http://www.albertmohler.com/wp-content/themes/albert-mohler-v5/img/logo-am-lg.gif'
publisher = 'Albert Mohler' publisher = 'Albert Mohler'
language = 'en'
author = 'Albert Mohler' author = 'Albert Mohler'
feeds = [(u"Albert Mohler's Blog", feeds = [(u"Albert Mohler's Blog",

View File

@ -21,7 +21,6 @@ class WwwAltomdata_dk(BasicNewsRecipe):
resolve_internal_links = True resolve_internal_links = True
remove_empty_feeds = True remove_empty_feeds = True
auto_cleanup = True auto_cleanup = True
language = 'da'
feeds = [ feeds = [
('Alt om DATA, Datatid TechLife', 'http://www.altomdata.dk/feed'), ('Alt om DATA, Datatid TechLife', 'http://www.altomdata.dk/feed'),

View File

@ -19,8 +19,6 @@ class AmericanProspect(BasicNewsRecipe):
use_embedded_content = False use_embedded_content = False
no_stylesheets = True
keep_only_tags = [ keep_only_tags = [
dict(id=['title', 'content']), dict(id=['title', 'content']),
] ]

View File

@ -18,8 +18,6 @@ class Arbetaren_SE(BasicNewsRecipe):
encoding = 'utf-8' encoding = 'utf-8'
language = 'sv' language = 'sv'
auto_cleanup = True auto_cleanup = True
auto_cleanup_keep = '//div[@class="thumbnail"]' auto_cleanup_keep = '//div[@class="thumbnail"]|//div[@id="article-image"]|//span[@class="important"]'
auto_cleanup_keep = '//div[@id="article-image"]'
auto_cleanup_keep = '//div[@id="article-image"]|//span[@class="important"]'
feeds = [(u'Nyheter', u'https://www.arbetaren.se/feed')] feeds = [(u'Nyheter', u'https://www.arbetaren.se/feed')]

View File

@ -25,7 +25,6 @@ class bergfreunde_blog(BasicNewsRecipe):
__author__ = 'VoHe' __author__ = 'VoHe'
no_stylesheets = True no_stylesheets = True
remove_javascript = True remove_javascript = True
remove_javascript = True
remove_empty_feeds = True remove_empty_feeds = True
ignore_duplicate_articles = {'title', 'url'} ignore_duplicate_articles = {'title', 'url'}

View File

@ -15,8 +15,6 @@ class BusinessStandardPrint(BasicNewsRecipe):
language = 'en_IN' language = 'en_IN'
masthead_url = 'https://bsmedia.business-standard.com/include/_mod/site/html5/images/business-standard-logo.png' masthead_url = 'https://bsmedia.business-standard.com/include/_mod/site/html5/images/business-standard-logo.png'
encoding = 'utf-8' encoding = 'utf-8'
resolve_internal_links = True
remove_empty_feeds = True
no_stylesheets = True no_stylesheets = True
remove_javascript = True remove_javascript = True

View File

@ -10,7 +10,6 @@ class AdvancedUserRecipe1283848012(BasicNewsRecipe):
language = 'he' language = 'he'
__author__ = 'marbs' __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 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 remove_javascript = True
timefmt = '[%a, %d %b, %Y]' timefmt = '[%a, %d %b, %Y]'
oldest_article = 1 oldest_article = 1
@ -23,7 +22,6 @@ class AdvancedUserRecipe1283848012(BasicNewsRecipe):
dict(name='div', attrs={'class': 'ArticleBodyComponent'}), dict(name='div', attrs={'class': 'ArticleBodyComponent'}),
] ]
remove_tags = [dict(name='p', attrs={'text': [' ']})] remove_tags = [dict(name='p', attrs={'text': [' ']})]
max_articles_per_feed = 100
preprocess_regexps = [ preprocess_regexps = [
(re.compile(r'<p>&nbsp;</p>', re.DOTALL | re.IGNORECASE), lambda match: '') (re.compile(r'<p>&nbsp;</p>', re.DOTALL | re.IGNORECASE), lambda match: '')
] ]

View File

@ -4,7 +4,6 @@ from calibre.web.feeds.news import BasicNewsRecipe
class AdvancedUserRecipe1271446252(BasicNewsRecipe): class AdvancedUserRecipe1271446252(BasicNewsRecipe):
title = u'CanardPC' title = u'CanardPC'
oldest_article = 7 oldest_article = 7
max_articles_per_feed = 100
language = 'fr' language = 'fr'
__author__ = 'zorgluf' __author__ = 'zorgluf'
max_articles_per_feed = 25 max_articles_per_feed = 25

View File

@ -31,7 +31,6 @@ class CBN(BasicNewsRecipe):
remove_javascript = True remove_javascript = True
use_embedded_content = False use_embedded_content = False
no_stylesheets = True no_stylesheets = True
language = 'en'
encoding = 'iso-8859-1' encoding = 'iso-8859-1'
conversion_options = {'linearize_tables': True} conversion_options = {'linearize_tables': True}

View File

@ -9,7 +9,6 @@ class ChristianPost(BasicNewsRecipe):
__author__ = 'sexymax15' __author__ = 'sexymax15'
description = 'Homepage' description = 'Homepage'
language = 'en' language = 'en'
no_stylesheets = True
use_embedded_content = False use_embedded_content = False
oldest_article = 30 oldest_article = 30
max_articles_per_feed = 15 max_articles_per_feed = 15

View File

@ -12,7 +12,6 @@ class Colta(BasicNewsRecipe):
publisher = 'OpenSpace.ru' publisher = 'OpenSpace.ru'
category = 'news' category = 'news'
cover_url = u'http://www.colta.ru/assets/logo-afb684c3d35fc1f6f103f9fb638c8ec1.png' cover_url = u'http://www.colta.ru/assets/logo-afb684c3d35fc1f6f103f9fb638c8ec1.png'
language = 'ru'
no_stylesheets = True no_stylesheets = True
remove_javascript = True remove_javascript = True

View File

@ -7,7 +7,6 @@ class AdvancedUserRecipe1316944753(BasicNewsRecipe):
language = 'en' 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 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' category = 'Movies, TV, Games, Comics, Cult, News, Reviews'
language = 'en'
oldest_article = 7 oldest_article = 7
max_articles_per_feed = 100 max_articles_per_feed = 100

View File

@ -18,12 +18,10 @@ class Descopera(BasicNewsRecipe):
oldest_article = 5 oldest_article = 5
language = 'ro' language = 'ro'
max_articles_per_feed = 100 max_articles_per_feed = 100
no_stylesheets = True
use_embedded_content = False use_embedded_content = False
category = 'Ziare,Reviste,Descopera' category = 'Ziare,Reviste,Descopera'
encoding = 'utf-8' encoding = 'utf-8'
cover_url = 'http://www.descopera.ro/images/header_images/logo.gif' cover_url = 'http://www.descopera.ro/images/header_images/logo.gif'
use_embedded_content = False
no_stylesheets = True no_stylesheets = True
auto_cleanup = True auto_cleanup = True

View File

@ -11,7 +11,6 @@ class DesiringGodEnglish(BasicNewsRecipe):
cover_url = 'http://cdn0.desiringgod.org/images/layout/breadcrumbs_dg_mark.png' cover_url = 'http://cdn0.desiringgod.org/images/layout/breadcrumbs_dg_mark.png'
masthead_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 oldest_article = 7
max_articles_per_feed = 50 max_articles_per_feed = 50
auto_cleanup = True auto_cleanup = True

View File

@ -11,8 +11,6 @@ class DeutscheWelle(BasicNewsRecipe):
max_articles_per_feed = 200 max_articles_per_feed = 200
no_stylesheets = True no_stylesheets = True
remove_javascript = True remove_javascript = True
no_stylesheets = True
remove_javascript = True
remove_empty_feeds = True remove_empty_feeds = True
ignore_duplicate_articles = {'title', 'url'} ignore_duplicate_articles = {'title', 'url'}
remove_attributes = ['height', 'width', 'style'] remove_attributes = ['height', 'width', 'style']

View File

@ -15,7 +15,7 @@ class Dobreprogramy_pl(BasicNewsRecipe):
index = 'http://www.dobreprogramy.pl/' index = 'http://www.dobreprogramy.pl/'
no_stylesheets = True no_stylesheets = True
language = 'pl' language = 'pl'
extra_css = '.title {font-size:22px;}' extra_css = '.title {font-size:22px;}, h1 { font-size:130% }'
oldest_article = 8 oldest_article = 8
max_articles_per_feed = 100 max_articles_per_feed = 100
remove_attrs = ['style', 'width', 'height'] remove_attrs = ['style', 'width', 'height']
@ -41,7 +41,3 @@ class Dobreprogramy_pl(BasicNewsRecipe):
if not r.string: if not r.string:
r.extract() r.extract()
return soup return soup
extra_css = '''
h1 { font-size:130% }
'''

View File

@ -121,7 +121,7 @@ class econ_search(BasicNewsRecipe):
'Use the Advanced section of the recipe to search.' 'Use the Advanced section of the recipe to search.'
) )
remove_attributes = ['style', 'height', 'width'] remove_attributes = ['data-reactid', 'style', 'height', 'width']
no_stylesheets = True no_stylesheets = True
ignore_duplicate_articles = {'url'} ignore_duplicate_articles = {'url'}
extra_css = ''' extra_css = '''
@ -154,8 +154,6 @@ class econ_search(BasicNewsRecipe):
) )
] ]
keep_only_tags = [dict(name='article', id=lambda x: not x)] 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 # economist.com has started throttling after about 60% of the total has
# downloaded with connection reset by peer (104) errors. # downloaded with connection reset by peer (104) errors.
delay = 3 delay = 3

View File

@ -9,8 +9,10 @@ class AdvancedUserRecipe1311790237(BasicNewsRecipe):
language = 'es_CO' language = 'es_CO'
cover_url = 'http://www.elcolombiano.com/images/logoElColombiano348x46.gif' cover_url = 'http://www.elcolombiano.com/images/logoElColombiano348x46.gif'
remove_tags_before = dict(id='contenidoArt') remove_tags_before = dict(id='contenidoArt')
remove_tags_after = dict(id='enviaTips') remove_tags_after = [
remove_tags_after = dict(id='zonaPata') dict(id='enviaTips'),
dict(id='zonaPata'),
]
oldest_article = 1 oldest_article = 1
max_articles_per_feed = 100 max_articles_per_feed = 100
remove_javascript = True remove_javascript = True

View File

@ -18,7 +18,6 @@ class elcorreo(BasicNewsRecipe):
ignore_duplicate_articles = {'url'} ignore_duplicate_articles = {'url'}
encoding = 'utf-8' encoding = 'utf-8'
masthead_url = 'https://s1.ppllstatics.com/starfish/1.3.76/assets/images/logos/logo-elcorreo.svg' masthead_url = 'https://s1.ppllstatics.com/starfish/1.3.76/assets/images/logos/logo-elcorreo.svg'
encoding = 'utf-8'
remove_empty_feeds = True remove_empty_feeds = True
resolve_internal_links = True resolve_internal_links = True
max_articles_per_feed = 25 # articles max_articles_per_feed = 25 # articles
@ -88,14 +87,6 @@ class elcorreo(BasicNewsRecipe):
p.name = 'div' p.name = 'div'
return soup 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): def get_browser(self, *args, **kwargs):
kwargs['user_agent'] = 'Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)' kwargs['user_agent'] = 'Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)'
br = BasicNewsRecipe.get_browser(self, *args, **kwargs) br = BasicNewsRecipe.get_browser(self, *args, **kwargs)

View File

@ -13,7 +13,10 @@ class ESO(BasicNewsRecipe):
remove_empty_feeds = True remove_empty_feeds = True
use_embedded_content = False use_embedded_content = False
cover_url = 'https://www.eso.org/public/archives/logos/medium/eso-logo-black-outline.jpg' 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( remove_tags = [dict(id='lang_row'), dict(
attrs={'class': ['pr_typeid', 'pr_news_feature_link', 'outreach_usage', 'hidden']})] attrs={'class': ['pr_typeid', 'pr_news_feature_link', 'outreach_usage', 'hidden']})]
feeds = [ feeds = [
@ -21,9 +24,6 @@ class ESO(BasicNewsRecipe):
(u'Og\u0142oszenia', u'http://www.eso.org/public/poland/announcements/feed/'), (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/')] (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): def preprocess_html(self, soup):
for a in soup.findAll('a', href=True): for a in soup.findAll('a', href=True):
if a['href'].startswith('/'): if a['href'].startswith('/'):

View File

@ -13,7 +13,6 @@ class FairbanksDailyNewsminer(BasicNewsRecipe):
remove_javascript = True remove_javascript = True
use_embedded_content = False use_embedded_content = False
no_stylesheets = True no_stylesheets = True
language = 'en'
encoding = 'utf8' encoding = 'utf8'
conversion_options = {'linearize_tables': True} conversion_options = {'linearize_tables': True}
auto_cleanup = True auto_cleanup = True

View File

@ -108,8 +108,7 @@ class FazNet(BasicNewsRecipe):
scale_news_images = (10,100) scale_news_images = (10,100)
delay = 1 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_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'
test_article = None
extra_css = ''' extra_css = '''
.header-title,.scrolly-title {font-size: 1.5em; font-weight:bold; text-align:left;} .header-title,.scrolly-title {font-size: 1.5em; font-weight:bold; text-align:left;}

View File

@ -8,7 +8,6 @@ class AdvancedUserRecipe1716089864(BasicNewsRecipe):
description = 'The Blog of Bill Gates.' description = 'The Blog of Bill Gates.'
language = 'en' language = 'en'
__author__ = 'Spicy Poison' __author__ = 'Spicy Poison'
description = 'The Blog of Bill Gates'
publisher = 'Bill Gates' publisher = 'Bill Gates'
oldest_article = 30 oldest_article = 30
max_articles_per_feed = 50 max_articles_per_feed = 50

View File

@ -11,7 +11,6 @@ class GlasgowHerald(BasicNewsRecipe):
title = u'Glasgow Herald' title = u'Glasgow Herald'
oldest_article = 1 oldest_article = 1
max_articles_per_feed = 100 max_articles_per_feed = 100
no_stylesheets = True
language = 'en_GB' language = 'en_GB'
__author__ = 'Kovid Goyal' __author__ = 'Kovid Goyal'

View File

@ -29,9 +29,8 @@ class AdvancedUserRecipe1287519083(BasicNewsRecipe):
remove_tags_before = dict(id='modul_artikel') remove_tags_before = dict(id='modul_artikel')
remove_tags_after = dict(id='articlecontent') remove_tags_after = dict(id='articlecontent')
remove_tags = dict(id='articlesidebar')
remove_tags = [ remove_tags = [
dict(id='articlesidebar'),
dict(name='div', attrs={'class': ['articlecomment', dict(name='div', attrs={'class': ['articlecomment',
'articlebookmark', 'teaser_anzeige', 'teaser_umfrage', 'articlebookmark', 'teaser_anzeige', 'teaser_umfrage',
'navigation', 'subnavigation']}) 'navigation', 'subnavigation']})

View File

@ -35,7 +35,6 @@ class Harpers(BasicNewsRecipe):
remove_tags = [ remove_tags = [
classes('header-controls') classes('header-controls')
] ]
remove_attributes = ['style', 'width', 'height']
extra_css = ''' extra_css = '''
img {display:block; margin:0 auto;} img {display:block; margin:0 auto;}

View File

@ -50,7 +50,7 @@ class HighCountryNews(BasicNewsRecipe):
auto_cleanup = False auto_cleanup = False
remove_javascript = True remove_javascript = True
remove_empty_feeds = True remove_empty_feeds = True
remove_attributes = ['width', 'height'] remove_attributes = ['style', 'width', 'height']
use_embedded_content = False use_embedded_content = False
masthead_url = 'http://www.hcn.org/logo.jpg' masthead_url = 'http://www.hcn.org/logo.jpg'
@ -69,8 +69,6 @@ class HighCountryNews(BasicNewsRecipe):
# caption and credit for description & author of pictures # caption and credit for description & author of pictures
# main-topic # main-topic
remove_attributes = ['style']
extra_css = ''' extra_css = '''
h1 {font-size: 1.6em; text-align: left} h1 {font-size: 1.6em; text-align: left}
h2 {font-size: 1em; font-style: italic; font-weight: normal} h2 {font-size: 1em; font-style: italic; font-weight: normal}

View File

@ -13,7 +13,6 @@ class hnaDe(BasicNewsRecipe):
title = 'HNA' title = 'HNA'
description = 'local news from Hessen/Germany' description = 'local news from Hessen/Germany'
__author__ = 'Oliver Niesner' __author__ = 'Oliver Niesner'
use_embedded_content = False
language = 'de' language = 'de'
use_embedded_content = False use_embedded_content = False
timefmt = ' [%d %b %Y]' timefmt = ' [%d %b %Y]'

View File

@ -14,7 +14,6 @@ class ingr(BasicNewsRecipe):
no_stylesheets = True no_stylesheets = True
use_embedded_content = False use_embedded_content = False
remove_empty_feeds = True remove_empty_feeds = True
encoding = 'utf8'
keep_only_tags = [ keep_only_tags = [
dict(name='h1'), dict(name='h1'),

View File

@ -30,7 +30,6 @@ class TheIndependentNew(BasicNewsRecipe):
publisher = 'The Independent' publisher = 'The Independent'
oldest_article = 2.0 oldest_article = 2.0
ignore_duplicate_articles = {'title', 'url'} ignore_duplicate_articles = {'title', 'url'}
remove_empty_feeds = True
category = 'news, UK' category = 'news, UK'
no_stylesheets = True no_stylesheets = True
use_embedded_content = False use_embedded_content = False

View File

@ -20,8 +20,6 @@ class IndependentAustralia(BasicNewsRecipe):
description = ( description = (
'Independent Australia is a progressive journal focusing on politics, democracy, the environment, Australian history and Australian identity.' '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.') ' It contains news and opinion from Australia and around the world.')
oldest_article = 7 # days
max_articles_per_feed = 100
feeds = [ 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;}' extra_css = '.byline{font-size:smaller;margin-bottom:10px;}.inline-caption{display:block;font-size:smaller;text-decoration: none;}'
compress_news_images = True compress_news_images = True
feeds = [
(
'Independent Australia',
'https://feeds.feedburner.com/IndependentAustralia'
),
]
# ************************************ # ************************************
# Break up feed into categories (based on BrianG's code snippet): # Break up feed into categories (based on BrianG's code snippet):
# ************************************ # ************************************

View File

@ -15,7 +15,6 @@ class InquirerNet(BasicNewsRecipe):
description = 'News from Philipines' description = 'News from Philipines'
oldest_article = 2 oldest_article = 2
max_articles_per_feed = 100 max_articles_per_feed = 100
no_stylesheets = True
use_embedded_content = False use_embedded_content = False
encoding = 'utf8' encoding = 'utf8'
publisher = 'inquirer.net' publisher = 'inquirer.net'
@ -23,8 +22,6 @@ class InquirerNet(BasicNewsRecipe):
lang = 'en' lang = 'en'
language = 'en' language = 'en'
use_embedded_content = False
no_stylesheets = True no_stylesheets = True
auto_cleanup = True auto_cleanup = True

View File

@ -25,7 +25,6 @@ class JerusalemPost(BasicNewsRecipe):
__author__ = 'Kovid Goyal' __author__ = 'Kovid Goyal'
max_articles_per_feed = 10 max_articles_per_feed = 10
no_stylesheets = True
def get_browser(self): def get_browser(self):
return BasicNewsRecipe.get_browser(self, user_agent='common_words/based') return BasicNewsRecipe.get_browser(self, user_agent='common_words/based')

View File

@ -10,7 +10,6 @@ class Kosmonauta(BasicNewsRecipe):
category = 'astronomy' category = 'astronomy'
language = 'pl' language = 'pl'
cover_url = 'http://bi.gazeta.pl/im/4/10393/z10393414X,Kosmonauta-net.jpg' cover_url = 'http://bi.gazeta.pl/im/4/10393/z10393414X,Kosmonauta-net.jpg'
no_stylesheets = True
oldest_article = 7 oldest_article = 7
no_stylesheets = True no_stylesheets = True
remove_javascript = True remove_javascript = True

View File

@ -27,7 +27,6 @@ class LeMonde(BasicNewsRecipe):
oldest_article = 1 oldest_article = 1
no_stylesheets = True no_stylesheets = True
remove_empty_feeds = True
ignore_duplicate_articles = {'title', 'url'} ignore_duplicate_articles = {'title', 'url'}
reverse_article_order = True reverse_article_order = True
remove_empty_feeds = True remove_empty_feeds = True

View File

@ -14,7 +14,6 @@ class LWN(BasicNewsRecipe):
__author__ = 'Oliver Niesner' __author__ = 'Oliver Niesner'
description = 'Linux Weekly News' description = 'Linux Weekly News'
oldest_article = 54 oldest_article = 54
language = _('English')
max_articles_per_feed = 100 max_articles_per_feed = 100
needs_subscription = True needs_subscription = True
language = 'en' language = 'en'

View File

@ -23,7 +23,6 @@ class czytania_mateusz(BasicNewsRecipe):
remove_javascript = True remove_javascript = True
simultaneous_downloads = 2 simultaneous_downloads = 2
max_articles_per_feed = 100 max_articles_per_feed = 100
auto_cleanup = True
feeds = [(u'Czytania', u'http://mateusz.pl/rss/czytania/')] feeds = [(u'Czytania', u'http://mateusz.pl/rss/czytania/')]

View File

@ -24,7 +24,6 @@ class ModorosBlogHu(BasicNewsRecipe):
remove_empty_feeds = True remove_empty_feeds = True
no_stylesheets = True no_stylesheets = True
feeds = [(u'Modoros Blog', u'http://modoros.blog.hu/rss')] feeds = [(u'Modoros Blog', u'http://modoros.blog.hu/rss')]
remove_javascript = True
use_embedded_content = False use_embedded_content = False
preprocess_regexps = [ preprocess_regexps = [
(re.compile(r'<!--megosztas -->.*?</body>', re.DOTALL | re.IGNORECASE), (re.compile(r'<!--megosztas -->.*?</body>', re.DOTALL | re.IGNORECASE),

View File

@ -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.' description = u' Największy w Polsce serwis zajmujący się tematyką związaną z Apple i wszelkimi produktami tej firmy.'
cover_url = '' cover_url = ''
remove_empty_feeds = True remove_empty_feeds = True
no_stylesheets = True
oldest_article = 7 oldest_article = 7
max_articles_per_feed = 100000 max_articles_per_feed = 100000
recursions = 0 recursions = 0

View File

@ -7,13 +7,13 @@ from calibre.web.feeds.news import BasicNewsRecipe, classes
class NatGeo(BasicNewsRecipe): class NatGeo(BasicNewsRecipe):
title = 'National Geographic' 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' language = 'en'
encoding = 'utf8' encoding = 'utf8'
publisher = 'nationalgeographic.com' publisher = 'nationalgeographic.com'
category = 'science, nat geo' category = 'science, nat geo'
__author__ = 'Kovid Goyal, unkn0wn' __author__ = 'Kovid Goyal, unkn0wn'
description = 'Inspiring people to care about the planet since 1888'
timefmt = ' [%a, %d %b, %Y]' timefmt = ' [%a, %d %b, %Y]'
no_stylesheets = True no_stylesheets = True
use_embedded_content = False use_embedded_content = False

View File

@ -6,13 +6,13 @@ from calibre.web.feeds.news import BasicNewsRecipe
class NatGeo(BasicNewsRecipe): class NatGeo(BasicNewsRecipe):
title = 'National Geographic Kids' 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' language = 'en'
encoding = 'utf8' encoding = 'utf8'
publisher = 'kids.nationalgeographic.com' publisher = 'kids.nationalgeographic.com'
category = 'science, nat geo' category = 'science, nat geo'
__author__ = 'unkn0wn' __author__ = 'unkn0wn'
description = 'Inspiring people to care about the planet since 1888'
timefmt = ' [%a, %d %b, %Y]' timefmt = ' [%a, %d %b, %Y]'
use_embedded_content = False use_embedded_content = False
remove_javascript = True remove_javascript = True

View File

@ -7,13 +7,13 @@ from calibre.web.feeds.news import BasicNewsRecipe, classes
class NatGeo(BasicNewsRecipe): class NatGeo(BasicNewsRecipe):
title = 'National Geographic Traveller' 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' language = 'en'
encoding = 'utf8' encoding = 'utf8'
publisher = 'nationalgeographic.com' publisher = 'nationalgeographic.com'
category = 'science, nat geo' category = 'science, nat geo'
__author__ = 'unkn0wn' __author__ = 'unkn0wn'
description = 'Inspiring people to care about the planet since 1888'
timefmt = ' [%a, %d %b, %Y]' timefmt = ' [%a, %d %b, %Y]'
no_stylesheets = True no_stylesheets = True
use_embedded_content = False use_embedded_content = False

View File

@ -5,16 +5,14 @@ from calibre.web.feeds.news import BasicNewsRecipe, classes
class NatGeo(BasicNewsRecipe): class NatGeo(BasicNewsRecipe):
title = 'National Geographic History' title = 'National Geographic History'
description = ( description = ('From Caesar to Napoleon, the Pyramids to the Parthenon, the Trojan War to the Civil War—National Geographic '
'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. '
'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' language = 'en'
encoding = 'utf8' encoding = 'utf8'
publisher = 'nationalgeographic.com' publisher = 'nationalgeographic.com'
category = 'science, nat geo' category = 'science, nat geo'
__author__ = 'Kovid Goyal, unkn0wn' __author__ = 'Kovid Goyal, unkn0wn'
description = 'Inspiring people to care about the planet since 1888'
timefmt = ' [%a, %d %b, %Y]' timefmt = ' [%a, %d %b, %Y]'
no_stylesheets = True no_stylesheets = True
use_embedded_content = False use_embedded_content = False

View File

@ -8,13 +8,13 @@ from calibre.web.feeds.news import BasicNewsRecipe, classes
class NatGeo(BasicNewsRecipe): class NatGeo(BasicNewsRecipe):
title = 'National Geographic Magazine' 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' language = 'en'
encoding = 'utf8' encoding = 'utf8'
publisher = 'nationalgeographic.com' publisher = 'nationalgeographic.com'
category = 'science, nat geo' category = 'science, nat geo'
__author__ = 'Kovid Goyal, unkn0wn' __author__ = 'Kovid Goyal, unkn0wn'
description = 'Inspiring people to care about the planet since 1888'
timefmt = ' [%a, %d %b, %Y]' timefmt = ' [%a, %d %b, %Y]'
no_stylesheets = True no_stylesheets = True
use_embedded_content = False use_embedded_content = False

View File

@ -27,7 +27,6 @@ class AdvancedUserRecipe1306061239(BasicNewsRecipe):
simultaneous_downloads = 20 simultaneous_downloads = 20
use_embedded_content = False use_embedded_content = False
recursions = 0 recursions = 0
auto_cleanup = True
feeds = [ feeds = [
(u'NME News', u'http://www.nme.com/news/feed'), (u'NME News', u'http://www.nme.com/news/feed'),

View File

@ -13,8 +13,10 @@ class AdvancedUserRecipe1329123365(BasicNewsRecipe):
no_stylesheets = True no_stylesheets = True
remove_javascript = True remove_javascript = True
keep_only_tags = [dict(name='div', attrs={'id': 'content'})] keep_only_tags = [dict(name='div', attrs={'id': 'content'})]
remove_tags = [dict(name='div', attrs={'id': 'text_options'})] remove_tags = [
remove_tags = [dict(name='div', attrs={'id': 'social_shares_top'})] dict(name='div', attrs={'id': 'text_options'}),
dict(name='div', attrs={'id': 'social_shares_top'}),
]
remove_tags_after = dict(id='textsize') remove_tags_after = dict(id='textsize')
feeds = [(u'Business', u'http://novinite.bg/rss.php?category_id=1'), feeds = [(u'Business', u'http://novinite.bg/rss.php?category_id=1'),
(u'Politics', u'http://novinite.bg/rss.php?category_id=2'), (u'Politics', u'http://novinite.bg/rss.php?category_id=2'),

View File

@ -32,7 +32,6 @@ class NYTimesSports(BasicNewsRecipe):
max_articles_per_feed = 25 max_articles_per_feed = 25
use_embedded_content = False use_embedded_content = False
no_stylesheets = True no_stylesheets = True
language = 'en'
delay = 1 delay = 1
feeds = [ feeds = [

View File

@ -13,7 +13,6 @@ class OptyczneRecipe(BasicNewsRecipe):
description = u'Najlepsze testy obiektywów, testy aparatów cyfrowych i testy lornetek w sieci!' description = u'Najlepsze testy obiektywów, testy aparatów cyfrowych i testy lornetek w sieci!'
cover_url = '' cover_url = ''
remove_empty_feeds = True remove_empty_feeds = True
no_stylesheets = True
oldest_article = 7 oldest_article = 7
max_articles_per_feed = 100 max_articles_per_feed = 100
recursions = 0 recursions = 0

View File

@ -20,7 +20,6 @@ class ORF(BasicNewsRecipe):
masthead_url = 'https://www.orfonline.org/wp-content/uploads/2015/09/Logo_ORF_JPEG.jpg' masthead_url = 'https://www.orfonline.org/wp-content/uploads/2015/09/Logo_ORF_JPEG.jpg'
remove_attributes = ['style', 'height', 'width'] remove_attributes = ['style', 'height', 'width']
ignore_duplicate_articles = {'url', 'title'} ignore_duplicate_articles = {'url', 'title'}
remove_empty_feeds = True
oldest_article = 7 oldest_article = 7
simultaneous_downloads = 1 simultaneous_downloads = 1

View File

@ -20,7 +20,6 @@ class AdvancedUserRecipe1277129332(BasicNewsRecipe):
use_embedded_content = False use_embedded_content = False
no_stylesheets = True no_stylesheets = True
encoding = 'GB2312' encoding = 'GB2312'
language = 'zh'
conversion_options = {'linearize_tables': True} conversion_options = {'linearize_tables': True}
masthead_url = 'http://www.people.com.cn/img/2010wb/images/logo.gif' masthead_url = 'http://www.people.com.cn/img/2010wb/images/logo.gif'

View File

@ -11,7 +11,6 @@ class ppeRecipe(BasicNewsRecipe):
category = u'News' category = u'News'
description = u'Portal o konsolach i grach wideo.' 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;}' 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 no_stylesheets = True
oldest_article = 7 oldest_article = 7
max_articles_per_feed = 100 max_articles_per_feed = 100

View File

@ -23,7 +23,6 @@ class ReadersDigest(BasicNewsRecipe):
oldest_article = 60 oldest_article = 60
max_articles_per_feed = 200 max_articles_per_feed = 200
language = 'en'
remove_javascript = True remove_javascript = True
remove_attributes = ['style'] remove_attributes = ['style']

View File

@ -14,7 +14,6 @@ class SKAI(BasicNewsRecipe):
no_stylesheets = True no_stylesheets = True
use_embedded_content = False use_embedded_content = False
remove_empty_feeds = True remove_empty_feeds = True
encoding = 'utf8'
keep_only_tags = [ keep_only_tags = [
dict(name='h1'), dict(name='h1'),
dict(name='div', attrs={'class': ['articleText']}) dict(name='div', attrs={'class': ['articleText']})

View File

@ -43,7 +43,7 @@ class PrivateEyeRecipe(BasicNewsRecipe):
name = 'Oldie Online' name = 'Oldie Online'
series = 'The ' + name series = 'The ' + name
now = datetime.now().strftime(' %Y-%m') now = datetime.now().strftime(' %Y-%m')
title = series + now title = series + now # noqa: PIE794
title_sort = name + now + ', The' title_sort = name + now + ', The'
conversion_options = { conversion_options = {
'authors': 'The Oldie', 'authors': 'The Oldie',

View File

@ -32,7 +32,6 @@ class USAToday(BasicNewsRecipe):
timefmt = ' [%d %b %Y]' timefmt = ' [%d %b %Y]'
max_articles_per_feed = 25 max_articles_per_feed = 25
no_stylesheets = True no_stylesheets = True
remove_empty_feeds = True
keep_only_tags = [ keep_only_tags = [
classes('gnt_ar_hl gnt_ar_by gnt_ar_b topper__inner in-depth-content'), classes('gnt_ar_hl gnt_ar_by gnt_ar_b topper__inner in-depth-content'),

View File

@ -19,7 +19,6 @@ class AdvancedUserRecipe1283848012(BasicNewsRecipe):
dict(name='p', attrs={'class': 'subtitle'}), dict(name='p', attrs={'class': 'subtitle'}),
dict(name='p', attrs={'class': 'article_speakable'}), dict(name='p', attrs={'class': 'article_speakable'}),
] ]
max_articles_per_feed = 100
feeds = [ feeds = [
(u'חדשות', u'https://rss.walla.co.il/feed/1?type=main'), (u'חדשות', u'https://rss.walla.co.il/feed/1?type=main'),

View File

@ -8,9 +8,11 @@ class WozDie(BasicNewsRecipe):
language = 'de' language = 'de'
no_stylesheets = True no_stylesheets = True
remove_tags = [dict(name='p', attrs={'class': 'arrow_top'})] remove_tags = [
remove_tags = [dict(name='p', attrs={'class': 'bottom_right'})] dict(name='p', attrs={'class': 'arrow_top'}),
remove_tags = [dict(name='script')] dict(name='p', attrs={'class': 'bottom_right'}),
dict(name='script'),
]
extra_css = '''#print_titel{vertical-align: bottom; text-align: extra_css = '''#print_titel{vertical-align: bottom; text-align:
left; color: #666666; background-color: white; padding-top: 30px; padding- left; color: #666666; background-color: white; padding-top: 30px; padding-
bottom: 10px; border-bottom: 1px solid #999999;} #title{text-align: bottom: 10px; border-bottom: 1px solid #999999;} #title{text-align:

View File

@ -22,7 +22,7 @@ quote-style = 'single'
explicit-preview-rules = true explicit-preview-rules = true
ignore = [ ignore = [
'E402', 'E722', 'E741', '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', 'RUF001', 'RUF002', 'RUF003', 'RUF005', 'RUF012', 'RUF013', 'RUF015', 'RUF031', 'RUF100',
'F841', # because in preview, unused tuple unpacking variable that not use dummy syntax (prefix '_' underscore) '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) # raise error 'unused-variable', sigh (https://github.com/astral-sh/ruff/issues/8884)
@ -40,6 +40,7 @@ select = [
'E111', 'E112', 'E113', 'E117', # code indentation 'E111', 'E112', 'E113', 'E117', # code indentation
'E114', 'E115', 'E116', 'E261', 'E262', 'E265', # comment formating 'E114', 'E115', 'E116', 'E261', 'E262', 'E265', # comment formating
] ]
unfixable = ['PIE794']
[lint.per-file-ignores] [lint.per-file-ignores]
"recipes/*" = ['UP'] "recipes/*" = ['UP']

View File

@ -50,7 +50,6 @@ class MTP_DEVICE(BASE):
METADATA_CACHE = 'metadata.calibre' METADATA_CACHE = 'metadata.calibre'
DRIVEINFO = 'driveinfo.calibre' DRIVEINFO = 'driveinfo.calibre'
CAN_SET_METADATA = []
NEWS_IN_FOLDER = True NEWS_IN_FOLDER = True
MAX_PATH_LEN = 230 MAX_PATH_LEN = 230
THUMBNAIL_HEIGHT = DEFAULT_THUMBNAIL_HEIGHT THUMBNAIL_HEIGHT = DEFAULT_THUMBNAIL_HEIGHT

View File

@ -263,7 +263,6 @@ class ViewerBridge(Bridge):
search_result_not_found = from_js(object) search_result_not_found = from_js(object)
search_result_discovered = from_js(object) search_result_discovered = from_js(object)
find_next = from_js(object) find_next = from_js(object)
quit = from_js()
update_current_toc_nodes = from_js(object) update_current_toc_nodes = from_js(object)
toggle_full_screen = from_js() toggle_full_screen = from_js()
report_cfi = from_js(object, object) report_cfi = from_js(object, object)
@ -477,7 +476,6 @@ class WebView(RestartingWebEngineView):
new_bookmark = pyqtSignal(object) new_bookmark = pyqtSignal(object)
toggle_inspector = pyqtSignal() toggle_inspector = pyqtSignal()
toggle_lookup = pyqtSignal(object) toggle_lookup = pyqtSignal(object)
quit = pyqtSignal()
update_current_toc_nodes = pyqtSignal(object) update_current_toc_nodes = pyqtSignal(object)
toggle_full_screen = pyqtSignal() toggle_full_screen = pyqtSignal()
ask_for_open = pyqtSignal(object) ask_for_open = pyqtSignal(object)