mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
comment formating (auto-fix)
ruff 'E114,E115,E116,E261,E262,E265'
This commit is contained in:
parent
0b23eaf328
commit
19b9d979ab
@ -33,7 +33,7 @@ def formatter_funcs():
|
||||
|
||||
ans = {'doc': {}, 'sum': {}}
|
||||
with TemporaryDirectory() as tdir:
|
||||
db = LibraryDatabase(tdir) # needed to load formatter_funcs
|
||||
db = LibraryDatabase(tdir) # needed to load formatter_funcs
|
||||
ffml = FFMLProcessor()
|
||||
all_funcs = formatter_functions().get_builtins()
|
||||
for func_name, func in all_funcs.items():
|
||||
|
@ -13,13 +13,13 @@ from calibre.customize import FileTypePlugin
|
||||
|
||||
class HelloWorld(FileTypePlugin):
|
||||
|
||||
name = 'Hello World Plugin' # Name of the plugin
|
||||
name = 'Hello World Plugin' # Name of the plugin
|
||||
description = 'Set the publisher to Hello World for all new conversions'
|
||||
supported_platforms = ['windows', 'osx', 'linux'] # Platforms this plugin will run on
|
||||
author = 'Acme Inc.' # The author of this plugin
|
||||
supported_platforms = ['windows', 'osx', 'linux'] # Platforms this plugin will run on
|
||||
author = 'Acme Inc.' # The author of this plugin
|
||||
version = (1, 0, 0) # The version number of this plugin
|
||||
file_types = {'epub', 'mobi'} # The file types that this plugin will be applied to
|
||||
on_postprocess = True # Run this plugin after conversion is complete
|
||||
file_types = {'epub', 'mobi'} # The file types that this plugin will be applied to
|
||||
on_postprocess = True # Run this plugin after conversion is complete
|
||||
minimum_calibre_version = (0, 7, 53)
|
||||
|
||||
def run(self, path_to_ebook):
|
||||
|
@ -61,7 +61,7 @@ def generate_template_language_help(language, log):
|
||||
a = output.append
|
||||
|
||||
with TemporaryDirectory() as tdir:
|
||||
db = LibraryDatabase(tdir) # needed to load formatter_funcs
|
||||
db = LibraryDatabase(tdir) # needed to load formatter_funcs
|
||||
ffml = FFMLProcessor()
|
||||
all_funcs = formatter_functions().get_builtins()
|
||||
categories = defaultdict(dict)
|
||||
|
@ -274,7 +274,7 @@ class Economist(BasicNewsRecipe):
|
||||
'economist.com/cdn-cgi/image/width=600,quality=80,format=auto/')
|
||||
return soup
|
||||
|
||||
else: # Load articles from individual article pages {{{
|
||||
else: # Load articles from individual article pages {{{
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
BasicNewsRecipe.__init__(self, *args, **kwargs)
|
||||
|
@ -5,7 +5,7 @@ from datetime import date
|
||||
from calibre.web.feeds.news import BasicNewsRecipe
|
||||
|
||||
# figure out your local edition id from the log of this recipe
|
||||
edi_id = 182 # NTR VIJAYAWADA - 182
|
||||
edi_id = 182 # NTR VIJAYAWADA - 182
|
||||
|
||||
today = date.today().strftime('%d/%m/%Y')
|
||||
|
||||
|
@ -5,7 +5,7 @@ from datetime import date
|
||||
from calibre.web.feeds.news import BasicNewsRecipe
|
||||
|
||||
# figure out your local edition id from the log of this recipe
|
||||
edi_id = 34 # HYDERABAD MAIN I - 34
|
||||
edi_id = 34 # HYDERABAD MAIN I - 34
|
||||
|
||||
today = date.today().strftime('%d/%m/%Y')
|
||||
|
||||
|
@ -23,36 +23,36 @@ class AdvancedUserRecipe1718384518(BasicNewsRecipe):
|
||||
auto_cleanup = True
|
||||
|
||||
feeds = [
|
||||
#Phones
|
||||
# Phones
|
||||
('Phones', 'https://www.androidpolice.com/feed/phones/'),
|
||||
('News about Phones', 'https://www.androidpolice.com/feed/phones-news/'),
|
||||
('Guides about Phones', 'https://www.androidpolice.com/feed/phones-guide/'),
|
||||
('Phones Features', 'https://www.androidpolice.com/feed/phones-features/'),
|
||||
('Phones & Accessory Reviews', 'https://www.androidpolice.com/feed/phones-reviews/'),
|
||||
#Google
|
||||
# Google
|
||||
('Google', 'https://www.androidpolice.com/feed/google/'),
|
||||
('News about Google', 'https://www.androidpolice.com/feed/news-google/'),
|
||||
('Google Applications', 'https://www.androidpolice.com/feed/tag/google-app/'),
|
||||
('Guides about Google', 'https://www.androidpolice.com/feed/guides-google/'),
|
||||
('Features about Google', 'https://www.androidpolice.com/feed/features-google/'),
|
||||
#Operating Systems
|
||||
# Operating Systems
|
||||
('Operating Systems', 'https://www.androidpolice.com/feed/operating-systems/'),
|
||||
('News about Operating Systems', 'https://www.androidpolice.com/feed/news-operating-systems/'),
|
||||
('Guides about Operating Systems', 'https://www.androidpolice.com/feed/guides-operating-systems/'),
|
||||
('Features on Operating Systems', 'https://www.androidpolice.com/feed/features-operating-systems/'),
|
||||
#Chromebooks
|
||||
# Chromebooks
|
||||
('Chromebooks', 'https://www.androidpolice.com/feed/laptops/'),
|
||||
('News about Chromebooks', 'https://www.androidpolice.com/feed/news-chromebooks/'),
|
||||
('Guides about Chromebooks', 'https://www.androidpolice.com/feed/guides-chromebooks/'),
|
||||
('Chromebook & Laptop Reviews', 'https://www.androidpolice.com/feed/reviews-chromebooks/'),
|
||||
#Gadgets
|
||||
# Gadgets
|
||||
('Gadgets', 'https://www.androidpolice.com/feed/gadgets/'),
|
||||
('Smartwatches & Wearables', 'https://www.androidpolice.com/feed/wearables/'),
|
||||
('Audio', 'https://www.androidpolice.com/feed/tag/audio/'),
|
||||
('Accessories', 'https://www.androidpolice.com/feed/accessories/'),
|
||||
('Smart Home', 'https://www.androidpolice.com/feed/smart-home/'),
|
||||
('Applications & Games', 'https://www.androidpolice.com/feed/applications-games/'),
|
||||
#Reviews
|
||||
# Reviews
|
||||
('Reviews', 'https://www.androidpolice.com/feed/reviews/'),
|
||||
('Phones & Accessory Reviews', 'https://www.androidpolice.com/feed/phones-reviews/'),
|
||||
('Smartwatch & Wearable Reviews', 'https://www.androidpolice.com/feed/wearable-reviews/'),
|
||||
|
@ -22,21 +22,21 @@ class AdvancedUserRecipe1718382046(BasicNewsRecipe):
|
||||
auto_cleanup = True
|
||||
|
||||
feeds = [
|
||||
#Gardening
|
||||
# Gardening
|
||||
('Gardening', 'https://www.backyardboss.net/feed/category/gardening/'),
|
||||
('Outdoor Gardening', 'https://www.backyardboss.net/feed/category/gardening/outdoor-gardening/'),
|
||||
('Indoor Gardening', 'https://www.backyardboss.net/feed/category/gardening/indoor-gardening/'),
|
||||
('Fruits & Vegetables', 'https://www.backyardboss.net/feed/tag/gardening/fruits-and-vegetables/'),
|
||||
('Houseplants', 'https://www.backyardboss.net/feed/category/gardening/houseplants/'),
|
||||
('Plant Care', 'https://www.backyardboss.net/feed/category/gardening/plant-care/'),
|
||||
#Backyard
|
||||
# Backyard
|
||||
('Backyard', 'https://www.backyardboss.net/feed/category/backyard/'),
|
||||
('Home Improvement', 'https://www.backyardboss.net/feed/category/backyard/home-improvement/'),
|
||||
('Lawn Care', 'https://www.backyardboss.net/feed/category/backyard/lawn-care/'),
|
||||
('Landscaping', 'https://www.backyardboss.net/feed/category/backyard/landscape-industry/'),
|
||||
('Barbecue', 'https://www.backyardboss.net/feed/category/backyard/bbq/'),
|
||||
('Reviews', 'https://www.backyardboss.net/feed/category/backyard/reviews/'),
|
||||
#DIY & Project
|
||||
# DIY & Project
|
||||
('DIY & Projects', 'https://www.backyardboss.net/feed/category/diy/'),
|
||||
('How-To', 'https://www.backyardboss.net/feed/category/diy/how-to/'),
|
||||
('Designs & Ideas', 'https://www.backyardboss.net/feed/category/diy/designs-and-ideas/'),
|
||||
|
@ -58,7 +58,7 @@ class Bloomberg(BasicNewsRecipe):
|
||||
'Bloomberg delivers business and markets news, data, analysis, and video'
|
||||
' to the world, featuring stories from Businessweek and Bloomberg News.'
|
||||
)
|
||||
oldest_article = 1.2 # days
|
||||
oldest_article = 1.2 # days
|
||||
resolve_internal_links = True
|
||||
remove_empty_feeds = True
|
||||
cover_url = 'https://assets.bwbx.io/images/users/iqjWHBFdfxIU/ivUxvlPidC3M/v0/600x-1.jpg'
|
||||
|
@ -1,5 +1,5 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
#from __future__ import unicode_literals, division, absolute_import, print_function
|
||||
# from __future__ import unicode_literals, division, absolute_import, print_function
|
||||
from calibre.web.feeds.news import BasicNewsRecipe
|
||||
|
||||
__license__ = 'GPL v3'
|
||||
@ -58,8 +58,8 @@ class AdvancedUserRecipe1432200863(BasicNewsRecipe):
|
||||
('DLF-Kultur Film / Serie', 'https://www.deutschlandfunkkultur.de/film-serie-100.rss'),
|
||||
]
|
||||
keep_only_tags = [
|
||||
dict(name='nav', attrs={'class':'b-breadcrumbs'}), # DLF articles
|
||||
dict(name='article', attrs={'class':'b-article'}), # DLF articles
|
||||
dict(name='nav', attrs={'class':'b-breadcrumbs'}), # DLF articles
|
||||
dict(name='article', attrs={'class':'b-article'}), # DLF articles
|
||||
dict(name='div', attrs={'class':[
|
||||
'b-section-article-head-area',
|
||||
'b-section-editor-content',
|
||||
@ -76,6 +76,6 @@ class AdvancedUserRecipe1432200863(BasicNewsRecipe):
|
||||
dict(name='ul', attrs={'class':['b-social-icons']}), # DLF articles
|
||||
|
||||
dict(name='ul', attrs={'class':['b-social-icons']}), # DLF Kultur articles
|
||||
dict(name='div', attrs={'class':'b-footer-area-series'}), # DLF Kultur articles
|
||||
dict(name='div', attrs={'class':'b-footer-area-series'}), # DLF Kultur articles
|
||||
dict(name='div', attrs={'id':'weekender'})
|
||||
]
|
||||
|
@ -14,8 +14,8 @@ class DRNyheder(BasicNewsRecipe):
|
||||
('Udland', 'https://www.dr.dk/nyheder/service/feeds/udland'),
|
||||
('Penge', 'https://www.dr.dk/nyheder/service/feeds/penge'),
|
||||
('Politik', 'https://www.dr.dk/nyheder/service/feeds/politik'),
|
||||
#('Sporten', 'https://www.dr.dk/nyheder/service/feeds/sporten'),
|
||||
#('Seneste sport', 'https://www.dr.dk/nyheder/service/feeds/senestesport'),
|
||||
# ('Sporten', 'https://www.dr.dk/nyheder/service/feeds/sporten'),
|
||||
# ('Seneste sport', 'https://www.dr.dk/nyheder/service/feeds/senestesport'),
|
||||
('Viden', 'https://www.dr.dk/nyheder/service/feeds/viden'),
|
||||
('Kultur', 'https://www.dr.dk/nyheder/service/feeds/kultur'),
|
||||
('Musik', 'https://www.dr.dk/nyheder/service/feeds/musik'),
|
||||
@ -42,8 +42,8 @@ class DRNyheder(BasicNewsRecipe):
|
||||
publication_type = 'newspaper'
|
||||
encoding = 'utf8'
|
||||
language = 'da'
|
||||
oldest_article = 4 # 2 might be best
|
||||
max_articles_per_feed = 50 # 100 better, this is just for testing
|
||||
oldest_article = 4 # 2 might be best
|
||||
max_articles_per_feed = 50 # 100 better, this is just for testing
|
||||
no_stylesheets = True
|
||||
use_embedded_content = False
|
||||
auto_cleanup = False
|
||||
@ -106,15 +106,15 @@ class DRNyheder(BasicNewsRecipe):
|
||||
|
||||
keep_only_tags = [
|
||||
|
||||
dict(name='h1', attrs={'class': 'dre-article-title__heading'}), # Title
|
||||
dict(name='div', attrs={'class': 'dre-article-byline'}), # Author
|
||||
dict(name='figure', attrs={'class': 'dre-standard-article__figure'}), # Comment out to remove images
|
||||
dict(name='p', attrs={'class': 'dre-article-body-paragraph'}), # All body text of the article
|
||||
dict(name='h1', attrs={'class': 'dre-article-title__heading'}), # Title
|
||||
dict(name='div', attrs={'class': 'dre-article-byline'}), # Author
|
||||
dict(name='figure', attrs={'class': 'dre-standard-article__figure'}), # Comment out to remove images
|
||||
dict(name='p', attrs={'class': 'dre-article-body-paragraph'}), # All body text of the article
|
||||
dict(name='article', attrs={'itemtype': 'http://schema.org/NewsArticle'}),
|
||||
#dict(name="h1", attrs={'class': 'hydra-latest-news-page-short-news__title'}),
|
||||
#dict(name="p", attrs={'class': 'hydra-latest-news-page-short-news__paragraph'}),
|
||||
#dict(name="div", attrs={'class': 'dre-speech'}),
|
||||
#dict(name="div", attrs={'itemprop': 'author'})
|
||||
# dict(name="h1", attrs={'class': 'hydra-latest-news-page-short-news__title'}),
|
||||
# dict(name="p", attrs={'class': 'hydra-latest-news-page-short-news__paragraph'}),
|
||||
# dict(name="div", attrs={'class': 'dre-speech'}),
|
||||
# dict(name="div", attrs={'itemprop': 'author'})
|
||||
]
|
||||
|
||||
remove_tags = [
|
||||
@ -123,8 +123,8 @@ class DRNyheder(BasicNewsRecipe):
|
||||
'hydra-latest-news-page-short-news__share', 'hydra-latest-news-page-short-news__a11y-container',
|
||||
'hydra-latest-news-page-short-news__meta', 'hydra-latest-news-page-short-news__image-slider', 'dre-byline__dates']}),
|
||||
dict(name='source'),
|
||||
#dict(name='menu', attrs={'class': 'share'}),
|
||||
#dict(name='menu', attrs={'class': 'dr-site-share-horizontal'}),
|
||||
# dict(name='menu', attrs={'class': 'share'}),
|
||||
# dict(name='menu', attrs={'class': 'dr-site-share-horizontal'}),
|
||||
]
|
||||
|
||||
# Fixes images having the wrong aspect ratio
|
||||
|
@ -21,7 +21,7 @@ class elcorreo(BasicNewsRecipe):
|
||||
encoding = 'utf-8'
|
||||
remove_empty_feeds = True
|
||||
resolve_internal_links = True
|
||||
max_articles_per_feed = 25 # articles
|
||||
max_articles_per_feed = 25 # articles
|
||||
compress_news_images = True
|
||||
|
||||
recipe_specific_options = {
|
||||
|
@ -18,7 +18,7 @@ def format_tickaroo_liveblog(soup):
|
||||
for div in soup.findAll('div', attrs={'class':'tik4-content-block tik4-content-block--rich-text tik4-content-block--position-2'}):
|
||||
div.insert_before(soup.new_tag('br'))
|
||||
|
||||
#format liveblogs
|
||||
# format liveblogs
|
||||
for tag in soup.findAll('time'):
|
||||
ntag = soup.new_tag('br')
|
||||
tag.insert_before(ntag)
|
||||
@ -209,7 +209,7 @@ class FazNet(BasicNewsRecipe):
|
||||
if tag:
|
||||
story(soup,tag)
|
||||
|
||||
#Extract images and text from image galleries
|
||||
# Extract images and text from image galleries
|
||||
for par in soup.findAll('p'):
|
||||
if len(par.contents) == 1:
|
||||
cont = str(par.contents[0])
|
||||
@ -260,7 +260,7 @@ class FazNet(BasicNewsRecipe):
|
||||
|
||||
def postprocess_html(self, soup, first_fetch):
|
||||
|
||||
#Position point between figure caption and figure credit, where needed
|
||||
# Position point between figure caption and figure credit, where needed
|
||||
for tag in soup.findAll(attrs={'class':['body-elements__image-figcaption','header-teaser__image-details']}):
|
||||
if tag.string is None:
|
||||
if tag.contents[0].string:
|
||||
|
@ -41,7 +41,7 @@ class firstpost(BasicNewsRecipe):
|
||||
# 'photos', 'entertainment', 'living', 'education', 'sports', 'firstcricket',
|
||||
]
|
||||
|
||||
oldest_article = 1.2 # days
|
||||
oldest_article = 1.2 # days
|
||||
for sec in sections:
|
||||
a = 'https://www.firstpost.com/rss/{}.xml'
|
||||
feeds.append((sec.capitalize(), a.format(sec)))
|
||||
|
@ -20,7 +20,7 @@ class AdvancedUserRecipe1313693926(BasicNewsRecipe):
|
||||
language = 'de'
|
||||
encoding = 'UTF-8'
|
||||
|
||||
__author__ = 'Armin Geller' # 2013-02-05 V3
|
||||
__author__ = 'Armin Geller' # 2013-02-05 V3
|
||||
|
||||
oldest_article = 14
|
||||
max_articles_per_feed = 50
|
||||
|
@ -20,13 +20,13 @@ class AdvancedUserRecipe1718373345(BasicNewsRecipe):
|
||||
auto_cleanup = True
|
||||
|
||||
feeds = [
|
||||
#EURO 2024
|
||||
# EURO 2024
|
||||
('EURO 2024', 'https://www.footballfancast.com/feed/tag/euro-2024/'),
|
||||
('EURO England', 'https://www.footballfancast.com/feed/tag/england/'),
|
||||
('EURO Scotland', 'https://www.footballfancast.com/feed/tag/scotland/'),
|
||||
('EURO Groups', 'https://www.footballfancast.com/feed/tag/euro-2024-groups/'),
|
||||
('History of the EUROs', 'https://www.footballfancast.com/feed/tag/history-of-the-euros/'),
|
||||
#Transfer Rumours
|
||||
# Transfer Rumours
|
||||
('Transfer Focus', 'https://www.footballfancast.com/feed/tag/transfer-focus/'),
|
||||
('Saudi Pro League', 'https://www.footballfancast.com/feed/tag/saudi-pro-league/'),
|
||||
('Marcus Rashford', 'https://www.footballfancast.com/feed/tag/marcus-rashford/'),
|
||||
@ -34,7 +34,7 @@ class AdvancedUserRecipe1718373345(BasicNewsRecipe):
|
||||
('Michael Olise', 'https://www.footballfancast.com/feed/tag/michael-olise/'),
|
||||
('Bruno Guimarães', 'https://www.footballfancast.com/feed/tag/bruno-guimaraes/'),
|
||||
('Fabrizio Romano', 'https://www.footballfancast.com/feed/tag/fabrizio-romano/'),
|
||||
#Premier League
|
||||
# Premier League
|
||||
('Premier League', 'https://www.footballfancast.com/feed/tag/premier-league/'),
|
||||
('Arsenal', 'https://www.footballfancast.com/feed/tag/arsenal/'),
|
||||
('Aston Villa', 'https://www.footballfancast.com/feed/tag/aston-villa/'),
|
||||
@ -45,19 +45,19 @@ class AdvancedUserRecipe1718373345(BasicNewsRecipe):
|
||||
('Manchester United', 'https://www.footballfancast.com/feed/tag/manchester-united/'),
|
||||
('Tottenham Hotspur', 'https://www.footballfancast.com/feed/tag/tottenham-hotspur/'),
|
||||
('West Ham United', 'https://www.footballfancast.com/feed/tag/west-ham-united/'),
|
||||
#European Leagues
|
||||
# European Leagues
|
||||
('La Liga', 'https://www.footballfancast.com/feed/la-liga/'),
|
||||
('Bundesliga', 'https://www.footballfancast.com/feed/bundesliga/'),
|
||||
('Ligue 1', 'https://www.footballfancast.com/feed/ligue-1/'),
|
||||
('Serie A', 'https://www.footballfancast.com/feed/serie-a/'),
|
||||
#Champions League
|
||||
# Champions League
|
||||
('Champions League', 'https://www.footballfancast.com/feed/champions-league/'),
|
||||
('Real Madrid', 'https://www.footballfancast.com/feed/tag/real-madrid/'),
|
||||
('Barcelona', 'https://www.footballfancast.com/feed/tag/barcelona/'),
|
||||
('Bayern Munich', 'https://www.footballfancast.com/feed/tag/bayern-munich/'),
|
||||
('Paris Saint-Germain', 'https://www.footballfancast.com/feed/tag/psg/'),
|
||||
('Europa League', 'https://www.footballfancast.com/feed/europa-league/'),
|
||||
#Europa League
|
||||
# Europa League
|
||||
('ROMA', 'https://www.footballfancast.com/feed/tag/roma/'),
|
||||
('Villarreal', 'https://www.footballfancast.com/feed/tag/villarreal/'),
|
||||
|
||||
|
@ -21,12 +21,12 @@ class AdvancedUserRecipe1718380039(BasicNewsRecipe):
|
||||
auto_cleanup = True
|
||||
|
||||
feeds = [
|
||||
#Transfer Rumours
|
||||
# Transfer Rumours
|
||||
('Transfer Rumours', 'https://footballleagueworld.co.uk/feed/transfer-rumours/'),
|
||||
('Alex Scott', 'https://footballleagueworld.co.uk/feed/tag/alex-scott/'),
|
||||
('James Ward-Prowse', 'https://footballleagueworld.co.uk/feed/tag/james-ward-prowse/'),
|
||||
('Wilfried Gnonto', 'https://footballleagueworld.co.uk/feed/wilfried-gnonto/'),
|
||||
#Championship
|
||||
# Championship
|
||||
('Championship', 'https://footballleagueworld.co.uk/feed/championship/'),
|
||||
('Leeds United', 'https://footballleagueworld.co.uk/feed/tag/leeds-united/'),
|
||||
('Leicester City', 'https://footballleagueworld.co.uk/feed/tag/leicester-city/'),
|
||||
@ -36,14 +36,14 @@ class AdvancedUserRecipe1718380039(BasicNewsRecipe):
|
||||
('Southampton', 'https://footballleagueworld.co.uk/feed/tag/southampton/'),
|
||||
('Sunderland', 'https://footballleagueworld.co.uk/feed/tag/sunderland/'),
|
||||
('West Bromwich Albion', 'https://footballleagueworld.co.uk/feed/tag/west-bromwich-albion/'),
|
||||
#League One
|
||||
# League One
|
||||
('Barnsley', 'https://footballleagueworld.co.uk/feed/tag/barnsley/'),
|
||||
('Bolton Wanderers', 'https://footballleagueworld.co.uk/feed/tag/bolton-wanderers/'),
|
||||
('Charlton Athletic', 'https://footballleagueworld.co.uk/feed/tag/charlton-athletic/'),
|
||||
('Derby County', 'https://footballleagueworld.co.uk/feed/tag/derby-county/'),
|
||||
('Portsmouth', 'https://footballleagueworld.co.uk/feed/tag/portsmouth/'),
|
||||
('Reading', 'https://footballleagueworld.co.uk/feed/tag/reading/'),
|
||||
#League Two
|
||||
# League Two
|
||||
('Bradford City', 'https://footballleagueworld.co.uk/feed/tag/bradford-city/'),
|
||||
('Gillingham', 'https://footballleagueworld.co.uk/feed/tag/gillingham/'),
|
||||
('Notts County', 'https://footballleagueworld.co.uk/feed/tag/notts-county/'),
|
||||
|
@ -24,14 +24,14 @@ class AdvancedUserRecipe1718106336(BasicNewsRecipe):
|
||||
|
||||
feeds = [
|
||||
('Game News', 'https://gamerant.com/feed/gaming/'),
|
||||
#Platforms
|
||||
# Platforms
|
||||
('Platforms', 'https://gamerant.com/feed/platforms/'),
|
||||
('Playstation', 'https://gamerant.com/feed/tag/playstation/'),
|
||||
('Xbox', 'https://gamerant.com/feed/tag/xbox/'),
|
||||
('Nintendo', 'https://gamerant.com/feed/tag/nintendo/'),
|
||||
('PC Gaming', 'https://gamerant.com/feed/tag/pc/'),
|
||||
('Mobile Gaming', 'https://gamerant.com/feed/tag/mobile/'),
|
||||
#Game Rant Originals
|
||||
# Game Rant Originals
|
||||
('Game Rant Originals', 'https://gamerant.com/feed/originals/'),
|
||||
('Editorials', 'https://gamerant.com/feed/editorial/'),
|
||||
('Game Reviews', 'https://gamerant.com/feed/game-reviews/'),
|
||||
|
@ -20,7 +20,7 @@ class GlobalTimes(BasicNewsRecipe):
|
||||
encoding = 'utf-8'
|
||||
remove_empty_feeds = True
|
||||
resolve_internal_links = True
|
||||
oldest_article = 1 # days
|
||||
oldest_article = 1 # days
|
||||
|
||||
def get_cover_url(self):
|
||||
soup = self.index_to_soup('https://en.kiosko.net/cn/np/cn_global_times.html')
|
||||
|
@ -50,7 +50,7 @@ class google_news_de(BasicNewsRecipe):
|
||||
url = e.hdrs.get('location')
|
||||
soup = self.index_to_soup(url)
|
||||
link = soup.find('a', href=True)
|
||||
skip_sections =[ # add sections you want to skip
|
||||
skip_sections =[ # add sections you want to skip
|
||||
'/video/', '/videos/', '/media/', 'podcast-'
|
||||
]
|
||||
if any(x in link['href'] for x in skip_sections):
|
||||
|
@ -47,7 +47,7 @@ class horizons(BasicNewsRecipe):
|
||||
url = d
|
||||
else:
|
||||
soup = self.index_to_soup('https://www.cirsd.org/en/horizons')
|
||||
a = soup.findAll('a', href=True, attrs={'class':'horizon-gallery-box'})[0] #use 1 for previous edition
|
||||
a = soup.findAll('a', href=True, attrs={'class':'horizon-gallery-box'})[0] # use 1 for previous edition
|
||||
url = a['href']
|
||||
if url.startswith('/'):
|
||||
url = 'https://www.cirsd.org' + url
|
||||
|
@ -23,7 +23,7 @@ class AdvancedUserRecipe1718126839(BasicNewsRecipe):
|
||||
auto_cleanup = True
|
||||
|
||||
feeds = [
|
||||
#Car Types
|
||||
# Car Types
|
||||
('Fast Cars', 'https://www.hotcars.com/feed/category/fast-cars/'),
|
||||
('Classic Cars', 'https://www.hotcars.com/feed/tag/classic-cars/'),
|
||||
('Muscle Cars', 'https://www.hotcars.com/feed/category/muscle-cars/'),
|
||||
@ -32,13 +32,13 @@ class AdvancedUserRecipe1718126839(BasicNewsRecipe):
|
||||
('Mass Market Cars', 'https://www.hotcars.com/feed/category/mass-market-cars/'),
|
||||
('Luxury Cars', 'https://www.hotcars.com/feed/tag/luxury-cars/'),
|
||||
('Motorcycles', 'https://www.hotcars.com/feed/category/motorcycles/'),
|
||||
#Hot Cars Exclusives
|
||||
# Hot Cars Exclusives
|
||||
('Hot Cars Exclusives', 'https://www.hotcars.com/feed/category/hotcars-exclusives/'),
|
||||
('Car Reviews', 'https://www.hotcars.com/feed/category/car-reviews/'),
|
||||
('Car Guides', 'https://www.hotcars.com/feed/category/car-guides/'),
|
||||
('Car Renders', 'https://www.hotcars.com/feed/category/car-renders/'),
|
||||
('Hot Cars Awards', 'https://www.hotcars.com/feed/category/hotcars-awards/'),
|
||||
#Car Culture
|
||||
# Car Culture
|
||||
('News', 'https://www.hotcars.com/feed/category/news/'),
|
||||
('JDM Life', 'https://www.hotcars.com/feed/category/jdm-life/'),
|
||||
('Car TV', 'https://www.hotcars.com/feed/category/cars-on-tv/'),
|
||||
|
@ -20,18 +20,18 @@ class AdvancedUserRecipe1716091656(BasicNewsRecipe):
|
||||
auto_cleanup = True
|
||||
|
||||
feeds = [
|
||||
#Desktop
|
||||
# Desktop
|
||||
('Desktop', 'https://www.howtogeek.com/feed/category/desktop/'),
|
||||
('Windows', 'https://www.howtogeek.com/feed/category/windows/'),
|
||||
('Mac', 'https://www.howtogeek.com/feed/category/mac/'),
|
||||
('Linux', 'https://www.howtogeek.com/feed/category/linux/'),
|
||||
('Chromebook', 'https://www.howtogeek.com/feed/category/chromebook-chrome-os/'),
|
||||
#Mobile
|
||||
# Mobile
|
||||
('Mobile', 'https://www.howtogeek.com/feed/category/mobile/'),
|
||||
('Android', 'https://www.howtogeek.com/feed/category/android/'),
|
||||
('iOS', 'https://www.howtogeek.com/feed/tag/ios/'),
|
||||
('Cellular Carriers', 'https://www.howtogeek.com/feed/category/cellular-carriers/'),
|
||||
#Hardware
|
||||
# Hardware
|
||||
('Hardware', 'https://www.howtogeek.com/feed/category/hardware/'),
|
||||
('Computer Hardware', 'https://www.howtogeek.com/feed/category/hardware/'),
|
||||
('Wifi & Networking', 'https://www.howtogeek.com/feed/category/wifi-routers/'),
|
||||
@ -39,7 +39,7 @@ class AdvancedUserRecipe1716091656(BasicNewsRecipe):
|
||||
('eReaders', 'https://www.howtogeek.com/feed/category/ereaders/'),
|
||||
('Audio', 'https://www.howtogeek.com/feed/category/audio/'),
|
||||
('Televisions', 'https://www.howtogeek.com/feed/category/tv/'),
|
||||
#Web
|
||||
# Web
|
||||
('Web', 'https://www.howtogeek.com/feed/category/web/'),
|
||||
('Web Apps', 'https://www.howtogeek.com/feed/category/apps-web-apps/'),
|
||||
('Social Media', 'https://www.howtogeek.com/feed/category/social-media/'),
|
||||
@ -48,11 +48,11 @@ class AdvancedUserRecipe1716091656(BasicNewsRecipe):
|
||||
('Google', 'https://www.howtogeek.com/feed/category/google/'),
|
||||
('Microsoft', 'https://www.howtogeek.com/feed/category/microsoft/'),
|
||||
('Privacy & Security', 'https://www.howtogeek.com/feed/category/privacy-security/'),
|
||||
#Cutting Edge
|
||||
# Cutting Edge
|
||||
('Cutting Edge', 'https://www.howtogeek.com/feed/category/cutting-edge/'),
|
||||
('Virtual Reality', 'https://www.howtogeek.com/feed/category/virtual-reality/'),
|
||||
('AI & Machine Learning', 'https://www.howtogeek.com/feed/category/ai-machine-learning/'),
|
||||
#Lifestyle
|
||||
# Lifestyle
|
||||
('Lifestyle', 'https://www.howtogeek.com/feed/category/lifestyle/'),
|
||||
('Gaming', 'https://www.howtogeek.com/feed/category/video-games/'),
|
||||
('Streaming', 'https://www.howtogeek.com/feed/category/cord-cutting-streaming/'),
|
||||
@ -63,7 +63,7 @@ class AdvancedUserRecipe1716091656(BasicNewsRecipe):
|
||||
('Buying Guides', 'https://www.howtogeek.com/feed/buying-guides/'),
|
||||
('Deals', 'https://www.howtogeek.com/feed/tag/deals/'),
|
||||
|
||||
#Discontinued Feeds
|
||||
#('Electric Vehicles', 'https://www.howtogeek.com/feed/category/electric-vehicles/'),
|
||||
#('Cryptocurrency', 'https://www.howtogeek.com/feed/category/cryptocurrency/'),
|
||||
# Discontinued Feeds
|
||||
# ('Electric Vehicles', 'https://www.howtogeek.com/feed/category/electric-vehicles/'),
|
||||
# ('Cryptocurrency', 'https://www.howtogeek.com/feed/category/cryptocurrency/'),
|
||||
]
|
||||
|
@ -10,7 +10,7 @@ class lexfridman(BasicNewsRecipe):
|
||||
'philosophy and the nature of intelligence, consciousness, love, and power. Lex is an AI '
|
||||
'researcher at MIT and beyond. Download monthly.'
|
||||
)
|
||||
oldest_article = 30 # days
|
||||
oldest_article = 30 # days
|
||||
__author__ = 'unkn0wn'
|
||||
language = 'en'
|
||||
encoding = 'utf-8'
|
||||
|
@ -20,28 +20,28 @@ class AdvancedUserRecipe1716102924(BasicNewsRecipe):
|
||||
auto_cleanup = True
|
||||
|
||||
feeds = [
|
||||
#PC & Mobile
|
||||
# PC & Mobile
|
||||
('PC & Mobile', 'https://www.makeuseof.com/feed/category/pc-mobile/'),
|
||||
('Windows', 'https://www.makeuseof.com/feed/category/windows/'),
|
||||
('Mac', 'https://www.makeuseof.com/feed/category/mac/'),
|
||||
('Linux', 'https://www.makeuseof.com/feed/category/linux/'),
|
||||
('Android', 'https://www.makeuseof.com/feed/category/google-android/'),
|
||||
('iOS', 'https://www.makeuseof.com/feed/category/ios/'),
|
||||
#Internet
|
||||
# Internet
|
||||
('Internet', 'https://www.makeuseof.com/feed/category/web-based/'),
|
||||
('Social Media', 'https://www.makeuseof.com/feed/category/social-media/'),
|
||||
('Security', 'https://www.makeuseof.com/feed/category/security/'),
|
||||
('Programming', 'https://www.makeuseof.com/feed/category/programming/'),
|
||||
#Productivity
|
||||
# Productivity
|
||||
('Productivity', 'https://www.makeuseof.com/feed/category/productivity/'),
|
||||
('Creative', 'https://www.makeuseof.com/feed/category/creative/'),
|
||||
('DIY', 'https://www.makeuseof.com/feed/category/diy-projects/'),
|
||||
#Lifestyle
|
||||
# Lifestyle
|
||||
('Lifestyle', 'https://www.makeuseof.com/feed/category/lifestyle/'),
|
||||
('Smart Home', 'https://www.makeuseof.com/feed/category/smart-home/'),
|
||||
('Gaming', 'https://www.makeuseof.com/feed/category/games/'),
|
||||
('Entertainment', 'https://www.makeuseof.com/feed/category/entertainment/'),
|
||||
#Technology Explained
|
||||
# Technology Explained
|
||||
('Technology Explained', 'https://www.makeuseof.com/feed/category/technology-explained/'),
|
||||
('Artificial Intelligence', 'https://www.makeuseof.com/feed/tag/artificial-intelligence/'),
|
||||
('Tech Jargon', 'https://www.makeuseof.com/feed/tag/pc-jargon-terminology/'),
|
||||
|
@ -65,7 +65,7 @@ class Mediapart(BasicNewsRecipe):
|
||||
url = e.hdrs.get('location')
|
||||
soup = self.index_to_soup(url)
|
||||
link = soup.find('a', href=True)
|
||||
skip_sections =[ # add sections you want to skip
|
||||
skip_sections =[ # add sections you want to skip
|
||||
'/video/', '/videos/', '/media/'
|
||||
]
|
||||
if any(x in link['href'] for x in skip_sections):
|
||||
|
@ -16,7 +16,7 @@ class MoneyControlRecipe(BasicNewsRecipe):
|
||||
ignore_duplicate_articles = {'title', 'url'}
|
||||
remove_empty_feeds = True
|
||||
resolve_internal_links = True
|
||||
oldest_article = 1 # days
|
||||
oldest_article = 1 # days
|
||||
|
||||
extra_css = '''
|
||||
img {display:block; margin:0 auto;}
|
||||
|
@ -23,20 +23,20 @@ class AdvancedUserRecipe1716109041(BasicNewsRecipe):
|
||||
auto_cleanup = True
|
||||
|
||||
feeds = [
|
||||
#News feeds
|
||||
# News feeds
|
||||
('Trailers', 'https://movieweb.com/feed/trailers/'),
|
||||
('Movie News', 'https://movieweb.com/feed/movie-news/'),
|
||||
('TV News', 'https://movieweb.com/feed/tv-news/'),
|
||||
('Marvel Cinematic Universe News', 'https://movieweb.com/feed/mcu-news/'),
|
||||
('DC Universe News', 'https://movieweb.com/feed/tag/dcu-news/'),
|
||||
#Genre feeds
|
||||
# Genre feeds
|
||||
('Action', 'https://movieweb.com/feed/tag/action/'),
|
||||
('Comedy', 'https://movieweb.com/feed/tag/comedy/'),
|
||||
('Fantasy', 'https://movieweb.com/feed/tag/fantasy/'),
|
||||
('Horror', 'https://movieweb.com/feed/tag/horror/'),
|
||||
('Sci-Fi', 'https://movieweb.com/feed/tag/sci-fi/'),
|
||||
('Western', 'https://movieweb.com/feed/tag/western/'),
|
||||
#What to Watch feeds
|
||||
# What to Watch feeds
|
||||
('Apple TV+', 'https://movieweb.com/feed/tag/apple-tv-plus/'),
|
||||
('Criterion Collection', 'https://movieweb.com/feed/tag/criterion-collection/'),
|
||||
('Disney+', 'https://movieweb.com/feed/tag/disney-plus/'),
|
||||
|
@ -49,7 +49,7 @@ class NewYorker(BasicNewsRecipe):
|
||||
remove_attributes = ['style']
|
||||
|
||||
def preprocess_html(self, soup):
|
||||
w = '/w_320' # use '/w_640' for highres
|
||||
w = '/w_320' # use '/w_640' for highres
|
||||
for img in soup.findAll('img'):
|
||||
if img.has_attr('srcset'):
|
||||
for x in img['srcset'].split():
|
||||
|
@ -14,7 +14,7 @@ class newslaundry(BasicNewsRecipe):
|
||||
encoding = 'utf-8'
|
||||
no_stylesheets = True
|
||||
remove_javascript = True
|
||||
oldest_article = 7 # days
|
||||
oldest_article = 7 # days
|
||||
resolve_internal_links = True
|
||||
|
||||
ignore_duplicate_articles = {'url'}
|
||||
@ -34,5 +34,5 @@ class newslaundry(BasicNewsRecipe):
|
||||
|
||||
def print_version(self, url):
|
||||
if 'hindi.newslaundry' in url:
|
||||
self.abort_article('Skipping hindi article') # remove this line if you want hindi articles.
|
||||
self.abort_article('Skipping hindi article') # remove this line if you want hindi articles.
|
||||
return url
|
||||
|
@ -20,12 +20,12 @@ class AdvancedUserRecipe1718387215(BasicNewsRecipe):
|
||||
auto_cleanup = True
|
||||
|
||||
feeds = [
|
||||
#Segments
|
||||
# Segments
|
||||
('Devices', 'https://www.pocket-lint.com/feed/devices-segment/'),
|
||||
('Entertainment', 'https://www.pocket-lint.com/feed/entertainment-segment/'),
|
||||
('Lifestyle', 'https://www.pocket-lint.com/feed/lifestyle-segment/'),
|
||||
('Audio Video', 'https://www.pocket-lint.com/feed/audio-video-segment/'),
|
||||
#Segments
|
||||
# Segments
|
||||
('News', 'https://www.pocket-lint.com/feed/news/'),
|
||||
('Features', 'https://www.pocket-lint.com/feed/features/'),
|
||||
('Editorials', 'https://www.pocket-lint.com/feed/editorials/'),
|
||||
@ -33,13 +33,13 @@ class AdvancedUserRecipe1718387215(BasicNewsRecipe):
|
||||
('Lists', 'https://www.pocket-lint.com/feed/lists/'),
|
||||
('Guides', 'https://www.pocket-lint.com/feed/guides/'),
|
||||
('Hubs', 'https://www.pocket-lint.com/feed/hubs/'),
|
||||
#Best Products
|
||||
# Best Products
|
||||
('Reviews', 'https://www.pocket-lint.com/feed/reviews/'),
|
||||
('Buyer’s Guides', 'https://www.pocket-lint.com/feed/buyers-guides/'),
|
||||
('Comparisons', 'https://www.pocket-lint.com/feed/comparisons/'),
|
||||
('Gift Guides', 'https://www.pocket-lint.com/feed/gift-guides/'),
|
||||
('Deals', 'https://www.pocket-lint.com/feed/deals/'),
|
||||
#Topics
|
||||
# Topics
|
||||
('Apps', 'https://www.pocket-lint.com/feed/apps/'),
|
||||
('Augmented Reality & Virtual Reality', 'https://www.pocket-lint.com/feed/ar-vr/'),
|
||||
('Cameras', 'https://www.pocket-lint.com/feed/cameras/'),
|
||||
|
@ -19,7 +19,7 @@ class Politico(BasicNewsRecipe):
|
||||
' intelligence about European politics and policy. Download Weekly.')
|
||||
publisher = 'Axel Springer SE.'
|
||||
category = 'news, politics, Europe'
|
||||
oldest_article = 7 # days
|
||||
oldest_article = 7 # days
|
||||
max_articles_per_feed = 20
|
||||
use_embedded_content = False
|
||||
no_stylesheets = True
|
||||
|
@ -45,7 +45,7 @@ class AdvancedUserRecipe1303841067(BasicNewsRecipe):
|
||||
]
|
||||
|
||||
remove_tags = [
|
||||
dict(name='ul', attrs={'class':['wj-share-buttons']}), #Block social media
|
||||
dict(name='ul', attrs={'class':['wj-share-buttons']}), # Block social media
|
||||
]
|
||||
|
||||
feeds = [
|
||||
|
@ -24,7 +24,7 @@ class projectsynd(BasicNewsRecipe):
|
||||
resolve_internal_links = True
|
||||
remove_empty_feeds = True
|
||||
remove_attributes = ['style', 'height', 'width']
|
||||
oldest_article = 7 # days
|
||||
oldest_article = 7 # days
|
||||
storage = []
|
||||
|
||||
articles_are_obfuscated = True
|
||||
|
@ -48,28 +48,28 @@ class RadioCanada(BasicNewsRecipe):
|
||||
'''
|
||||
|
||||
keep_only_tags = [
|
||||
classes('text-fluid1' # title
|
||||
' group/signature' # author (top)
|
||||
' sc-jbo7hw-6 cemuXe sc-1ejcmnj-0 bKbDpQ' # whole article block
|
||||
' sc-jbo7hw-4 gPWroG' # individual paragraphs
|
||||
' sc-jbo7hw-3 GgmiC' # section title (h2 headings)
|
||||
' sc-1tkrlyq-0 sc-1tkrlyq-1 eJZZNJ dthPak sc-1fmq1ly-0 hGSCGE' # images
|
||||
' sc-1tkrlyq-2 gucMx transition-opacity ease-out' # images
|
||||
' sc-ic6be9-0 eZGuin' # figure/picture caption
|
||||
classes('text-fluid1' # title
|
||||
' group/signature' # author (top)
|
||||
' sc-jbo7hw-6 cemuXe sc-1ejcmnj-0 bKbDpQ' # whole article block
|
||||
' sc-jbo7hw-4 gPWroG' # individual paragraphs
|
||||
' sc-jbo7hw-3 GgmiC' # section title (h2 headings)
|
||||
' sc-1tkrlyq-0 sc-1tkrlyq-1 eJZZNJ dthPak sc-1fmq1ly-0 hGSCGE' # images
|
||||
' sc-1tkrlyq-2 gucMx transition-opacity ease-out' # images
|
||||
' sc-ic6be9-0 eZGuin' # figure/picture caption
|
||||
' blockquote'
|
||||
),
|
||||
]
|
||||
|
||||
remove_tags = [
|
||||
classes('print:hidden' # whatever is deemed not necessary while printing
|
||||
' xsOnly:hidden' # whetever is deemed not necessary on very small screens
|
||||
' sc-jbo7hw-0 dQmOIK' # ads
|
||||
' sc-1f1cagl-0 hvyKh' # buttons? (full-screen, contact author)
|
||||
' sc-jbo7hw-2' # link to full dossier and insights
|
||||
' sc-fqkvVR crilYZ rcplayer-show' # video player
|
||||
' framed' # "À lire aussi" (might be desirable in some cases?)
|
||||
' bg-gray100 light:bg-gray100 dark:bg-gray999 lg:mt-10 print:hidden' # "À la une" (links to other current events) and more
|
||||
' sc-pahfbg-0 beUHeC' # Infolettre
|
||||
classes('print:hidden' # whatever is deemed not necessary while printing
|
||||
' xsOnly:hidden' # whetever is deemed not necessary on very small screens
|
||||
' sc-jbo7hw-0 dQmOIK' # ads
|
||||
' sc-1f1cagl-0 hvyKh' # buttons? (full-screen, contact author)
|
||||
' sc-jbo7hw-2' # link to full dossier and insights
|
||||
' sc-fqkvVR crilYZ rcplayer-show' # video player
|
||||
' framed' # "À lire aussi" (might be desirable in some cases?)
|
||||
' bg-gray100 light:bg-gray100 dark:bg-gray999 lg:mt-10 print:hidden' # "À la une" (links to other current events) and more
|
||||
' sc-pahfbg-0 beUHeC' # Infolettre
|
||||
),
|
||||
dict(name='aside')
|
||||
]
|
||||
|
@ -63,20 +63,20 @@ class RND(BasicNewsRecipe):
|
||||
('Wirtschaft', 'https://www.rnd.de/arc/outboundfeeds/rss/category/wirtschaft/'),
|
||||
('Sport', 'https://www.rnd.de/arc/outboundfeeds/rss/category/sport/'),
|
||||
('Panorama', 'https://www.rnd.de/arc/outboundfeeds/rss/category/panorama/'),
|
||||
#('Promis', 'https://www.rnd.de/arc/outboundfeeds/rss/category/promis/'),
|
||||
#('Reise', 'https://www.rnd.de/arc/outboundfeeds/rss/category/reise/'),
|
||||
#('Medien', 'https://www.rnd.de/arc/outboundfeeds/rss/category/medien/'),
|
||||
#('Digital', 'https://www.rnd.de/arc/outboundfeeds/rss/category/digital/'),
|
||||
#('Kultur', 'https://www.rnd.de/arc/outboundfeeds/rss/category/kultur/'),
|
||||
#('Wissen', 'https://www.rnd.de/arc/outboundfeeds/rss/category/wissen/'),
|
||||
#('Familie', 'https://www.rnd.de/arc/outboundfeeds/rss/category/familie/'),
|
||||
#('Gesundheit', 'https://www.rnd.de/arc/outboundfeeds/rss/category/gesundheit/'),
|
||||
#('Lifestyle', 'https://www.rnd.de/arc/outboundfeeds/rss/category/lifestyle/'),
|
||||
#('Bauen & Wohnen', 'https://www.rnd.de/arc/outboundfeeds/rss/category/bauen-und-wohnen/'),
|
||||
#('Geld & Finanzen', 'https://www.rnd.de/arc/outboundfeeds/rss/category/geld-und-finanzen/'),
|
||||
#('Liebe & Partnerschaft', 'https://www.rnd.de/arc/outboundfeeds/rss/category/liebe-und-partnerschaft/'),
|
||||
#('Beruf & Bildung', 'https://www.rnd.de/arc/outboundfeeds/rss/category/beruf-und-bildung/'),
|
||||
#('E-Mobility', 'https://www.rnd.de/arc/outboundfeeds/rss/category/e-mobility/')
|
||||
# ('Promis', 'https://www.rnd.de/arc/outboundfeeds/rss/category/promis/'),
|
||||
# ('Reise', 'https://www.rnd.de/arc/outboundfeeds/rss/category/reise/'),
|
||||
# ('Medien', 'https://www.rnd.de/arc/outboundfeeds/rss/category/medien/'),
|
||||
# ('Digital', 'https://www.rnd.de/arc/outboundfeeds/rss/category/digital/'),
|
||||
# ('Kultur', 'https://www.rnd.de/arc/outboundfeeds/rss/category/kultur/'),
|
||||
# ('Wissen', 'https://www.rnd.de/arc/outboundfeeds/rss/category/wissen/'),
|
||||
# ('Familie', 'https://www.rnd.de/arc/outboundfeeds/rss/category/familie/'),
|
||||
# ('Gesundheit', 'https://www.rnd.de/arc/outboundfeeds/rss/category/gesundheit/'),
|
||||
# ('Lifestyle', 'https://www.rnd.de/arc/outboundfeeds/rss/category/lifestyle/'),
|
||||
# ('Bauen & Wohnen', 'https://www.rnd.de/arc/outboundfeeds/rss/category/bauen-und-wohnen/'),
|
||||
# ('Geld & Finanzen', 'https://www.rnd.de/arc/outboundfeeds/rss/category/geld-und-finanzen/'),
|
||||
# ('Liebe & Partnerschaft', 'https://www.rnd.de/arc/outboundfeeds/rss/category/liebe-und-partnerschaft/'),
|
||||
# ('Beruf & Bildung', 'https://www.rnd.de/arc/outboundfeeds/rss/category/beruf-und-bildung/'),
|
||||
# ('E-Mobility', 'https://www.rnd.de/arc/outboundfeeds/rss/category/e-mobility/')
|
||||
]
|
||||
|
||||
def parse_feeds(self):
|
||||
@ -116,5 +116,5 @@ class RND(BasicNewsRecipe):
|
||||
for keyword in unwanted_article_keywords:
|
||||
if keyword in raw:
|
||||
print('Skipping unwanted article with keyword(s):',keyword)
|
||||
#self.abort_article('Skipping unwanted article')
|
||||
# self.abort_article('Skipping unwanted article')
|
||||
return raw
|
||||
|
@ -60,137 +60,137 @@ class Saechsische(BasicNewsRecipe):
|
||||
]
|
||||
|
||||
feeds = [
|
||||
#('Alle Artikel der SZ', 'https://www.saechsische.de/arc/outboundfeeds/rss/'),
|
||||
# ('Alle Artikel der SZ', 'https://www.saechsische.de/arc/outboundfeeds/rss/'),
|
||||
('Stadt Dresden', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/dresden'),
|
||||
#('Altstadt', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/dresden/altstadt'),
|
||||
#('Blasewitz', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/dresden/blasewitz'),
|
||||
#('Cotta', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/dresden/cotta'),
|
||||
#('Klotzsche', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/dresden/klotzsche'),
|
||||
#('Leuben', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/dresden/leuben'),
|
||||
#('Loschwitz', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/dresden/loschwitz'),
|
||||
#('Neustadt', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/dresden/neustadt'),
|
||||
#('Pieschen', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/dresden/pieschen'),
|
||||
#('Plauen', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/dresden/plauen'),
|
||||
#('Prohlis', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/dresden/prohlis'),
|
||||
#('Cossebaude', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/dresden/cossebaude'),
|
||||
#('Langebrück', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/dresden/langebrueck'),
|
||||
#('Gompitz/Altfranken', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/dresden/gompitz-altfranken'),
|
||||
#('Weixdorf', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/dresden/weixdorf'),
|
||||
#('Schönfeld-Weißig', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/dresden/schoenfeld-weissig'),
|
||||
#('Landkreis Bautzen', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/bautzen-lk'),
|
||||
#('Stadt Bautzen', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/bautzen-lk/bautzen'),
|
||||
#('Bischofswerda', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/bautzen-lk/bischofswerda'),
|
||||
#('Kamenz', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/bautzen-lk/kamenz'),
|
||||
#('Pulsnitz', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/bautzen-lk/pulsnitz'),
|
||||
#('Radeberg', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/bautzen-lk/radeberg'),
|
||||
#('Hoyerswerda', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/bautzen-lk/hoyerswerda'),
|
||||
#('Bernsdorf', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/bautzen-lk/bernsdorf'),
|
||||
#('Großröhrsdorf', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/bautzen-lk/grossroehrsdorf'),
|
||||
#('Lauta', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/bautzen-lk/lauta'),
|
||||
#('Schirgiswalde-Kirschau', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/bautzen-lk/schirgiswalde-kirschau'),
|
||||
#('Wittichenau', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/bautzen-lk/wittichenau'),
|
||||
#('Landkreis Görlitz', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/goerlitz-lk'),
|
||||
#('Stadt Görlitz', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/goerlitz-lk/goerlitz'),
|
||||
#('Niesky', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/goerlitz-lk/niesky'),
|
||||
#('Löbau', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/goerlitz-lk/loebau'),
|
||||
#('Zittau', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/goerlitz-lk/zittau'),
|
||||
#('Ostritz', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/goerlitz-lk/ostritz'),
|
||||
#('Rothenburg/Oberlausitz', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/goerlitz-lk/rothenburg'),
|
||||
#('Zittauer Gebirge', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/goerlitz-lk/zittauer-gebirge'),
|
||||
#('Vierkirchen', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/goerlitz-lk/vierkirchen'),
|
||||
#('Bad Muskau', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/goerlitz-lk/bad-muskau'),
|
||||
#('Weißwasser', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/goerlitz-lk/weisswasser'),
|
||||
#('Boxberg', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/goerlitz-lk/boxberg'),
|
||||
#('Ebersbach-Neugersdorf', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/goerlitz-lk/ebersbach-neugersdorf'),
|
||||
#('Kodersdorf', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/goerlitz-lk/kodersdorf'),
|
||||
#('Landkreis Sächsische Schweiz-Osterzgebirge', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/saechsische-schweiz-osterzgebirge'),
|
||||
#('Pirna', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/saechsische-schweiz-osterzgebirge/pirna'),
|
||||
#('Sebnitz', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/saechsische-schweiz-osterzgebirge/sebnitz'),
|
||||
#('Bad Schandau', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/saechsische-schweiz-osterzgebirge/bad-schandau'),
|
||||
#('Bad Gottleuba-Berggießhübel', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/saechsische-schweiz-osterzgebirge/bad-gottleuba-berggiesshuebel'),
|
||||
#('Heidenau', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/saechsische-schweiz-osterzgebirge/heidenau'),
|
||||
#('Dippoldiswalde', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/saechsische-schweiz-osterzgebirge/dippoldiswalde'),
|
||||
#('Altenberg', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/saechsische-schweiz-osterzgebirge/altenberg'),
|
||||
#('Freital', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/saechsische-schweiz-osterzgebirge/freital'),
|
||||
#('Stolpen', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/saechsische-schweiz-osterzgebirge/stolpen'),
|
||||
#('Glashütte', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/saechsische-schweiz-osterzgebirge/glashuette'),
|
||||
#('Wilsdruff', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/saechsische-schweiz-osterzgebirge/wilsdruff'),
|
||||
#('Neustadt in Sachsen', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/saechsische-schweiz-osterzgebirge/neustadt-in-sachsen'),
|
||||
#('Landkreis Meißen', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/meissen-lk'),
|
||||
#('Meißen', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/meissen-lk/meissen'),
|
||||
#('Radebeul', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/meissen-lk/radebeul'),
|
||||
#('Riesa', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/meissen-lk/riesa'),
|
||||
#('Großenhain', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/meissen-lk/grossenhain'),
|
||||
#('Nossen', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/meissen-lk/nossen'),
|
||||
#('Lommatzsch', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/meissen-lk/lommatzsch'),
|
||||
#('Radeburg', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/meissen-lk/radeburg'),
|
||||
#('Königsbrücker Heide', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/meissen-lk/koenigsbruecker-heide'),
|
||||
#('Weinböhla', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/meissen-lk/weinboehla'),
|
||||
#('Moritzburg', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/meissen-lk/moritzburg'),
|
||||
#('Coswig', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/meissen-lk/coswig'),
|
||||
#('Gröditz', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/meissen-lk/groeditz'),
|
||||
#('Klipphausen', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/meissen-lk/klipphausen'),
|
||||
#('Landkreis Mittelsachsen', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/mittelsachsen'),
|
||||
#('Döbeln', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/mittelsachsen/doebeln'),
|
||||
#('Freiberg', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/mittelsachsen/freiberg'),
|
||||
#('Mittweida', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/mittelsachsen/mittweida'),
|
||||
#('Leisnig', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/mittelsachsen/leisnig'),
|
||||
#('Waldheim', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/mittelsachsen/waldheim'),
|
||||
#('Frankenberg', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/mittelsachsen/frankenberg'),
|
||||
#('Großschirma', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/mittelsachsen/grossschirma'),
|
||||
#('Hainichen', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/mittelsachsen/hainichen'),
|
||||
#('Augustusburg', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/mittelsachsen/augustusburg'),
|
||||
#('Jahnatal', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/mittelsachsen/jahnatal'),
|
||||
#('Landkreis Zwickau', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/zwickau-lk'),
|
||||
#('Stadt Leipzig', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/leipzig'),
|
||||
#('Chemnitz', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/chemnitz'),
|
||||
#('Landkreis Nordsachsen', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/nordsachsen'),
|
||||
#('Landkreis Leipzig', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/leipzig-lk'),
|
||||
#('Erzgebirgskreis', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/erzgebirgskreis'),
|
||||
#('Annaberg-Buchholz', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/erzgebirgskreis/annaberg-buchholz'),
|
||||
#('Seiffen', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/erzgebirgskreis/seiffen'),
|
||||
#('Vogtlandkreis', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/vogtland'),
|
||||
#('Plauen', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/vogtland/plauen'),
|
||||
#('Tschechien', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/tschechien'),
|
||||
# ('Altstadt', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/dresden/altstadt'),
|
||||
# ('Blasewitz', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/dresden/blasewitz'),
|
||||
# ('Cotta', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/dresden/cotta'),
|
||||
# ('Klotzsche', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/dresden/klotzsche'),
|
||||
# ('Leuben', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/dresden/leuben'),
|
||||
# ('Loschwitz', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/dresden/loschwitz'),
|
||||
# ('Neustadt', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/dresden/neustadt'),
|
||||
# ('Pieschen', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/dresden/pieschen'),
|
||||
# ('Plauen', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/dresden/plauen'),
|
||||
# ('Prohlis', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/dresden/prohlis'),
|
||||
# ('Cossebaude', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/dresden/cossebaude'),
|
||||
# ('Langebrück', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/dresden/langebrueck'),
|
||||
# ('Gompitz/Altfranken', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/dresden/gompitz-altfranken'),
|
||||
# ('Weixdorf', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/dresden/weixdorf'),
|
||||
# ('Schönfeld-Weißig', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/dresden/schoenfeld-weissig'),
|
||||
# ('Landkreis Bautzen', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/bautzen-lk'),
|
||||
# ('Stadt Bautzen', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/bautzen-lk/bautzen'),
|
||||
# ('Bischofswerda', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/bautzen-lk/bischofswerda'),
|
||||
# ('Kamenz', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/bautzen-lk/kamenz'),
|
||||
# ('Pulsnitz', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/bautzen-lk/pulsnitz'),
|
||||
# ('Radeberg', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/bautzen-lk/radeberg'),
|
||||
# ('Hoyerswerda', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/bautzen-lk/hoyerswerda'),
|
||||
# ('Bernsdorf', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/bautzen-lk/bernsdorf'),
|
||||
# ('Großröhrsdorf', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/bautzen-lk/grossroehrsdorf'),
|
||||
# ('Lauta', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/bautzen-lk/lauta'),
|
||||
# ('Schirgiswalde-Kirschau', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/bautzen-lk/schirgiswalde-kirschau'),
|
||||
# ('Wittichenau', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/bautzen-lk/wittichenau'),
|
||||
# ('Landkreis Görlitz', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/goerlitz-lk'),
|
||||
# ('Stadt Görlitz', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/goerlitz-lk/goerlitz'),
|
||||
# ('Niesky', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/goerlitz-lk/niesky'),
|
||||
# ('Löbau', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/goerlitz-lk/loebau'),
|
||||
# ('Zittau', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/goerlitz-lk/zittau'),
|
||||
# ('Ostritz', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/goerlitz-lk/ostritz'),
|
||||
# ('Rothenburg/Oberlausitz', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/goerlitz-lk/rothenburg'),
|
||||
# ('Zittauer Gebirge', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/goerlitz-lk/zittauer-gebirge'),
|
||||
# ('Vierkirchen', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/goerlitz-lk/vierkirchen'),
|
||||
# ('Bad Muskau', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/goerlitz-lk/bad-muskau'),
|
||||
# ('Weißwasser', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/goerlitz-lk/weisswasser'),
|
||||
# ('Boxberg', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/goerlitz-lk/boxberg'),
|
||||
# ('Ebersbach-Neugersdorf', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/goerlitz-lk/ebersbach-neugersdorf'),
|
||||
# ('Kodersdorf', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/goerlitz-lk/kodersdorf'),
|
||||
# ('Landkreis Sächsische Schweiz-Osterzgebirge', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/saechsische-schweiz-osterzgebirge'),
|
||||
# ('Pirna', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/saechsische-schweiz-osterzgebirge/pirna'),
|
||||
# ('Sebnitz', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/saechsische-schweiz-osterzgebirge/sebnitz'),
|
||||
# ('Bad Schandau', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/saechsische-schweiz-osterzgebirge/bad-schandau'),
|
||||
# ('Bad Gottleuba-Berggießhübel', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/saechsische-schweiz-osterzgebirge/bad-gottleuba-berggiesshuebel'),
|
||||
# ('Heidenau', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/saechsische-schweiz-osterzgebirge/heidenau'),
|
||||
# ('Dippoldiswalde', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/saechsische-schweiz-osterzgebirge/dippoldiswalde'),
|
||||
# ('Altenberg', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/saechsische-schweiz-osterzgebirge/altenberg'),
|
||||
# ('Freital', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/saechsische-schweiz-osterzgebirge/freital'),
|
||||
# ('Stolpen', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/saechsische-schweiz-osterzgebirge/stolpen'),
|
||||
# ('Glashütte', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/saechsische-schweiz-osterzgebirge/glashuette'),
|
||||
# ('Wilsdruff', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/saechsische-schweiz-osterzgebirge/wilsdruff'),
|
||||
# ('Neustadt in Sachsen', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/saechsische-schweiz-osterzgebirge/neustadt-in-sachsen'),
|
||||
# ('Landkreis Meißen', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/meissen-lk'),
|
||||
# ('Meißen', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/meissen-lk/meissen'),
|
||||
# ('Radebeul', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/meissen-lk/radebeul'),
|
||||
# ('Riesa', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/meissen-lk/riesa'),
|
||||
# ('Großenhain', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/meissen-lk/grossenhain'),
|
||||
# ('Nossen', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/meissen-lk/nossen'),
|
||||
# ('Lommatzsch', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/meissen-lk/lommatzsch'),
|
||||
# ('Radeburg', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/meissen-lk/radeburg'),
|
||||
# ('Königsbrücker Heide', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/meissen-lk/koenigsbruecker-heide'),
|
||||
# ('Weinböhla', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/meissen-lk/weinboehla'),
|
||||
# ('Moritzburg', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/meissen-lk/moritzburg'),
|
||||
# ('Coswig', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/meissen-lk/coswig'),
|
||||
# ('Gröditz', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/meissen-lk/groeditz'),
|
||||
# ('Klipphausen', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/meissen-lk/klipphausen'),
|
||||
# ('Landkreis Mittelsachsen', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/mittelsachsen'),
|
||||
# ('Döbeln', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/mittelsachsen/doebeln'),
|
||||
# ('Freiberg', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/mittelsachsen/freiberg'),
|
||||
# ('Mittweida', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/mittelsachsen/mittweida'),
|
||||
# ('Leisnig', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/mittelsachsen/leisnig'),
|
||||
# ('Waldheim', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/mittelsachsen/waldheim'),
|
||||
# ('Frankenberg', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/mittelsachsen/frankenberg'),
|
||||
# ('Großschirma', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/mittelsachsen/grossschirma'),
|
||||
# ('Hainichen', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/mittelsachsen/hainichen'),
|
||||
# ('Augustusburg', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/mittelsachsen/augustusburg'),
|
||||
# ('Jahnatal', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/mittelsachsen/jahnatal'),
|
||||
# ('Landkreis Zwickau', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/zwickau-lk'),
|
||||
# ('Stadt Leipzig', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/leipzig'),
|
||||
# ('Chemnitz', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/chemnitz'),
|
||||
# ('Landkreis Nordsachsen', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/nordsachsen'),
|
||||
# ('Landkreis Leipzig', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/leipzig-lk'),
|
||||
# ('Erzgebirgskreis', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/erzgebirgskreis'),
|
||||
# ('Annaberg-Buchholz', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/erzgebirgskreis/annaberg-buchholz'),
|
||||
# ('Seiffen', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/erzgebirgskreis/seiffen'),
|
||||
# ('Vogtlandkreis', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/vogtland'),
|
||||
# ('Plauen', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lokales/vogtland/plauen'),
|
||||
# ('Tschechien', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/tschechien'),
|
||||
('Sachsen', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/sachsen'),
|
||||
#('Der Osten', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/der-osten'),
|
||||
#('Politik in Sachsen', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/politik/regional'),
|
||||
#('Wirtschaft in Sachsen', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/wirtschaft/regional'),
|
||||
#('Sport in Sachsen', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/sport/regional'),
|
||||
#('Dynamo Dresden', 'https://www.saechsische.de/arc/outboundfeeds/rss/tags_slug/dynamo-dresden'),
|
||||
#('Outdoor in Sachsen', 'https://www.saechsische.de/arc/outboundfeeds/rss/tags_slug/outdoor-in-sachsen'),
|
||||
#('Autobahn 17 (A17)', 'https://www.saechsische.de/arc/outboundfeeds/rss/tags_slug/autobahn-17-(a17)'),
|
||||
#('Autobahn 4 (A4)', 'https://www.saechsische.de/arc/outboundfeeds/rss/tags_slug/autobahn-4-(a4)'),
|
||||
#('Autobahn 72 (A72)', 'https://www.saechsische.de/arc/outboundfeeds/rss/tags_slug/autobahn-72-(a72)'),
|
||||
#('Autobahn 9 (A9)', 'https://www.saechsische.de/arc/outboundfeeds/rss/tags_slug/autobahn-9-(a9)'),
|
||||
#('Bundesstraße 170 (B170)', 'https://www.saechsische.de/arc/outboundfeeds/rss/tags_slug/bundesstrasse-170-(b170)'),
|
||||
#('Bundesstraße 178 (B178)', 'https://www.saechsische.de/arc/outboundfeeds/rss/tags_slug/bundesstrasse-178-(b178)'),
|
||||
#('Bundesstraße 96 (B96)', 'https://www.saechsische.de/arc/outboundfeeds/rss/tags_slug/bundesstrasse-96-(b96)'),
|
||||
#('Erzgebirge', 'https://www.saechsische.de/arc/outboundfeeds/rss/tags_slug/erzgebirge'),
|
||||
#('Sachsen Freizeit', 'https://www.saechsische.de/arc/outboundfeeds/rss/tags_slug/sachsen-freizeit'),
|
||||
#('Sachsen Gastronomie', 'https://www.saechsische.de/arc/outboundfeeds/rss/tags_slug/sachsen-gastronomie'),
|
||||
#('Genuss und Kochen', 'https://www.saechsische.de/arc/outboundfeeds/rss/tags_slug/genuss-und-kochen'),
|
||||
#('Sächsische Schweiz', 'https://www.saechsische.de/arc/outboundfeeds/rss/tags_slug/saechsische-schweiz'),
|
||||
#('Sachsenkompass', 'https://www.saechsische.de/arc/outboundfeeds/rss/tags_slug/sachsenkompass'),
|
||||
# ('Der Osten', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/der-osten'),
|
||||
# ('Politik in Sachsen', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/politik/regional'),
|
||||
# ('Wirtschaft in Sachsen', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/wirtschaft/regional'),
|
||||
# ('Sport in Sachsen', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/sport/regional'),
|
||||
# ('Dynamo Dresden', 'https://www.saechsische.de/arc/outboundfeeds/rss/tags_slug/dynamo-dresden'),
|
||||
# ('Outdoor in Sachsen', 'https://www.saechsische.de/arc/outboundfeeds/rss/tags_slug/outdoor-in-sachsen'),
|
||||
# ('Autobahn 17 (A17)', 'https://www.saechsische.de/arc/outboundfeeds/rss/tags_slug/autobahn-17-(a17)'),
|
||||
# ('Autobahn 4 (A4)', 'https://www.saechsische.de/arc/outboundfeeds/rss/tags_slug/autobahn-4-(a4)'),
|
||||
# ('Autobahn 72 (A72)', 'https://www.saechsische.de/arc/outboundfeeds/rss/tags_slug/autobahn-72-(a72)'),
|
||||
# ('Autobahn 9 (A9)', 'https://www.saechsische.de/arc/outboundfeeds/rss/tags_slug/autobahn-9-(a9)'),
|
||||
# ('Bundesstraße 170 (B170)', 'https://www.saechsische.de/arc/outboundfeeds/rss/tags_slug/bundesstrasse-170-(b170)'),
|
||||
# ('Bundesstraße 178 (B178)', 'https://www.saechsische.de/arc/outboundfeeds/rss/tags_slug/bundesstrasse-178-(b178)'),
|
||||
# ('Bundesstraße 96 (B96)', 'https://www.saechsische.de/arc/outboundfeeds/rss/tags_slug/bundesstrasse-96-(b96)'),
|
||||
# ('Erzgebirge', 'https://www.saechsische.de/arc/outboundfeeds/rss/tags_slug/erzgebirge'),
|
||||
# ('Sachsen Freizeit', 'https://www.saechsische.de/arc/outboundfeeds/rss/tags_slug/sachsen-freizeit'),
|
||||
# ('Sachsen Gastronomie', 'https://www.saechsische.de/arc/outboundfeeds/rss/tags_slug/sachsen-gastronomie'),
|
||||
# ('Genuss und Kochen', 'https://www.saechsische.de/arc/outboundfeeds/rss/tags_slug/genuss-und-kochen'),
|
||||
# ('Sächsische Schweiz', 'https://www.saechsische.de/arc/outboundfeeds/rss/tags_slug/saechsische-schweiz'),
|
||||
# ('Sachsenkompass', 'https://www.saechsische.de/arc/outboundfeeds/rss/tags_slug/sachsenkompass'),
|
||||
('Politik', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/politik'),
|
||||
('Wirtschaft', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/wirtschaft'),
|
||||
#('Sport', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/sport'),
|
||||
# ('Sport', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/sport'),
|
||||
('Panorama', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/panorama'),
|
||||
#('Promis', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/promis'),
|
||||
#('Reise', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/reise'),
|
||||
#('Medien & TV', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/medien'),
|
||||
#('Digital', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/digital'),
|
||||
#('Kultur', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/kultur'),
|
||||
#('Wissen', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/wissen'),
|
||||
#('Familie', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/familie'),
|
||||
#('Gesundheit', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/gesundheit'),
|
||||
#('Lifestyle', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lifestyle'),
|
||||
#('Mobilität', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/mobilitaet'),
|
||||
#('Bauen & Wohnen', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/bauen-und-wohnen'),
|
||||
#('Geld & Finanzen', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/geld-und-finanzen'),
|
||||
#('Liebe & Partnerschaft', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/liebe-und-partnerschaft'),
|
||||
#('E-Mobility', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/e-mobility'),
|
||||
#('Beruf & Bildung', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/beruf-und-bildung')
|
||||
# ('Promis', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/promis'),
|
||||
# ('Reise', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/reise'),
|
||||
# ('Medien & TV', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/medien'),
|
||||
# ('Digital', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/digital'),
|
||||
# ('Kultur', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/kultur'),
|
||||
# ('Wissen', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/wissen'),
|
||||
# ('Familie', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/familie'),
|
||||
# ('Gesundheit', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/gesundheit'),
|
||||
# ('Lifestyle', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/lifestyle'),
|
||||
# ('Mobilität', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/mobilitaet'),
|
||||
# ('Bauen & Wohnen', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/bauen-und-wohnen'),
|
||||
# ('Geld & Finanzen', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/geld-und-finanzen'),
|
||||
# ('Liebe & Partnerschaft', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/liebe-und-partnerschaft'),
|
||||
# ('E-Mobility', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/e-mobility'),
|
||||
# ('Beruf & Bildung', 'https://www.saechsische.de/arc/outboundfeeds/rss/category/beruf-und-bildung')
|
||||
]
|
||||
|
||||
def parse_feeds(self):
|
||||
@ -230,5 +230,5 @@ class Saechsische(BasicNewsRecipe):
|
||||
for keyword in unwanted_article_keywords:
|
||||
if keyword in raw:
|
||||
print('Skipping unwanted article with keyword(s):',keyword)
|
||||
#self.abort_article('Skipping unwanted article')
|
||||
# self.abort_article('Skipping unwanted article')
|
||||
return raw
|
||||
|
@ -21,8 +21,8 @@ class Salon_com(BasicNewsRecipe):
|
||||
oldest_article = 7
|
||||
max_articles_per_feed = 100
|
||||
no_stylesheets = True
|
||||
#auto_cleanup = True
|
||||
#auto_cleanup_keep = '//div[@id="image-id"]'
|
||||
# auto_cleanup = True
|
||||
# auto_cleanup_keep = '//div[@id="image-id"]'
|
||||
ignore_duplicate_articles = {'title', 'url'}
|
||||
remove_empty_feeds = True
|
||||
|
||||
@ -40,14 +40,14 @@ class Salon_com(BasicNewsRecipe):
|
||||
remove_attributes = ['lang', 'style']
|
||||
|
||||
feeds = [
|
||||
#('News', 'http://www.salon.com/category/news/feed/rss/'),
|
||||
#('Politics', 'http://www.salon.com/category/politics/feed/rss/'),
|
||||
#('Business', 'http://www.salon.com/category/business/feed/rss/'),
|
||||
#('Technology', 'http://www.salon.com/category/technology/feed/rss/'),
|
||||
#('Innovation', 'http://www.salon.com/category/innovation/feed/rss/'),
|
||||
#('Sustainability', 'http://www.salon.com/category/sustainability/feed/rss/'),
|
||||
#('Entertainment', 'http://www.salon.com/category/entertainment/feed/rss/'),
|
||||
#('Life', 'http://www.salon.com/category/life/feed/rss/'),
|
||||
# ('News', 'http://www.salon.com/category/news/feed/rss/'),
|
||||
# ('Politics', 'http://www.salon.com/category/politics/feed/rss/'),
|
||||
# ('Business', 'http://www.salon.com/category/business/feed/rss/'),
|
||||
# ('Technology', 'http://www.salon.com/category/technology/feed/rss/'),
|
||||
# ('Innovation', 'http://www.salon.com/category/innovation/feed/rss/'),
|
||||
# ('Sustainability', 'http://www.salon.com/category/sustainability/feed/rss/'),
|
||||
# ('Entertainment', 'http://www.salon.com/category/entertainment/feed/rss/'),
|
||||
# ('Life', 'http://www.salon.com/category/life/feed/rss/'),
|
||||
#
|
||||
('News and Politics', 'https://www.salon.com/category/news-and-politics/feed'),
|
||||
('Culture', 'http://www.salon.com/category/culture/feed/'),
|
||||
|
@ -16,7 +16,7 @@ class scix(BasicNewsRecipe):
|
||||
)
|
||||
language = 'en'
|
||||
__author__ = 'unkn0wn'
|
||||
oldest_article = 1 # days
|
||||
oldest_article = 1 # days
|
||||
max_articles_per_feed = 50
|
||||
encoding = 'utf-8'
|
||||
remove_attributes = ['height', 'width']
|
||||
@ -51,8 +51,8 @@ class scix(BasicNewsRecipe):
|
||||
('Tech Xplore', 'https://techxplore.com/rss-feed/'),
|
||||
('Medical Xpress', 'https://medicalxpress.com/rss-feed/'),
|
||||
('Phys.org', 'https://phys.org/rss-feed/')
|
||||
#https://medicalxpress.com/feeds/
|
||||
#https://techxplore.com/feeds/
|
||||
# https://medicalxpress.com/feeds/
|
||||
# https://techxplore.com/feeds/
|
||||
]
|
||||
|
||||
def preprocess_html(self, soup):
|
||||
|
@ -24,17 +24,17 @@ class AdvancedUserRecipe1718370158(BasicNewsRecipe):
|
||||
auto_cleanup = True
|
||||
|
||||
feeds = [
|
||||
#Features
|
||||
# Features
|
||||
('Analysis', 'https://simpleflying.com/feed/category/analysis/'),
|
||||
('History', 'https://simpleflying.com/feed/category/history/'),
|
||||
('Exclusives', 'https://simpleflying.com/feed/category/exclusives/'),
|
||||
#By Region
|
||||
# By Region
|
||||
('Asia', 'https://simpleflying.com/feed/category/asia/'),
|
||||
('Europe', 'https://simpleflying.com/feed/category/europe/'),
|
||||
('North America', 'https://simpleflying.com/feed/category/north-america/'),
|
||||
('Africa', 'https://simpleflying.com/feed/category/africa/'),
|
||||
('Rest of World', 'https://simpleflying.com/feed/category/rest-of-world/'),
|
||||
#Travel
|
||||
# Travel
|
||||
('Trip Reports', 'https://simpleflying.com/feed/category/trip-reports/'),
|
||||
('Passanger Experience', 'https://simpleflying.com/feed/category/passenger-experience/'),
|
||||
|
||||
|
@ -18,7 +18,7 @@ class AdvancedUserRecipe1718089036(BasicNewsRecipe):
|
||||
|
||||
feeds = [
|
||||
('TechCrunch', 'https://techcrunch.com/feed/'),
|
||||
#Categories
|
||||
# Categories
|
||||
('Apps', 'https://techcrunch.com/category/apps/feed/'),
|
||||
('Artificial Intelligence', 'https://techcrunch.com/category/artificial-intelligence/feed/'),
|
||||
('Biotech', 'https://techcrunch.com/category/biotech-health/feed/'),
|
||||
@ -41,7 +41,7 @@ class AdvancedUserRecipe1718089036(BasicNewsRecipe):
|
||||
('Tech Policy & Government', 'https://techcrunch.com/category/government-policy/feed/'),
|
||||
('Transportation', 'https://techcrunch.com/category/transportation/feed/'),
|
||||
('Venture Capital', 'https://techcrunch.com/category/venture/feed/'),
|
||||
#Tags
|
||||
# Tags
|
||||
('Amazon', 'https://techcrunch.com/tag/amazon/feed/'),
|
||||
('Apple', 'https://techcrunch.com/tag/apple/feed/'),
|
||||
('Cloud Computing', 'https://techcrunch.com/tag/cloud-computing/feed/'),
|
||||
@ -52,6 +52,6 @@ class AdvancedUserRecipe1718089036(BasicNewsRecipe):
|
||||
('Meta', 'https://techcrunch.com/tag/meta/feed/'),
|
||||
('Microsoft', 'https://techcrunch.com/tag/microsoft/feed/'),
|
||||
('TikTok', 'https://techcrunch.com/tag/tiktok/feed/'),
|
||||
#Other
|
||||
# Other
|
||||
('Events Archive', 'https://techcrunch.com/events/feed/'),
|
||||
]
|
||||
|
@ -21,26 +21,26 @@ class AdvancedUserRecipe1718109535(BasicNewsRecipe):
|
||||
|
||||
feeds = [
|
||||
('Game Guides', 'https://www.thegamer.com/feed/category/game-guides/'),
|
||||
#AAA Games
|
||||
# AAA Games
|
||||
('AAA Games', 'https://www.thegamer.com/feed/aaa-games/'),
|
||||
('AAA Games Features', 'https://www.thegamer.com/feed/aaa-games/features/'),
|
||||
('AAA Games News', 'https://www.thegamer.com/feed/aaa-games/news/'),
|
||||
('AAA Games Lists', 'https://www.thegamer.com/feed/aaa-games/lists/'),
|
||||
#Live-Service Games
|
||||
# Live-Service Games
|
||||
('Live-Service Games', 'https://www.thegamer.com/feed/live-service-games/'),
|
||||
('Live-Service Games Features', 'https://www.thegamer.com/feed/live-service-games/features/'),
|
||||
('Live-Service Games News', 'https://www.thegamer.com/feed/live-service-games/news/'),
|
||||
('Live-Service Games Lists', 'https://www.thegamer.com/feed/live-service-games/lists/'),
|
||||
#Indie Games
|
||||
# Indie Games
|
||||
('Indie Games', 'https://www.thegamer.com/feed/indie-games/'),
|
||||
('Indie Games Features', 'https://www.thegamer.com/feed/indie-games/features/'),
|
||||
('Indie Games News', 'https://www.thegamer.com/feed/indie-games/news/'),
|
||||
('Indie Games Lists', 'https://www.thegamer.com/feed/indie-games/lists/'),
|
||||
#Streaming
|
||||
# Streaming
|
||||
('Streaming', 'https://www.thegamer.com/feed/streaming/'),
|
||||
('Streaming Features', 'https://www.thegamer.com/feed/streaming/features/'),
|
||||
('Streaming News', 'https://www.thegamer.com/feed/streaming/news/'),
|
||||
#Movies & Shows
|
||||
# Movies & Shows
|
||||
('Movies & Shows', 'https://www.thegamer.com/feed/movies-tv-anime/'),
|
||||
('Movies & Shows Features', 'https://www.thegamer.com/feed/movies-tv-anime/features/'),
|
||||
('Movies & Shows News', 'https://www.thegamer.com/feed/movies-tv-anime/news/'),
|
||||
|
@ -23,14 +23,14 @@ class AdvancedUserRecipe1718381004(BasicNewsRecipe):
|
||||
auto_cleanup = True
|
||||
|
||||
feeds = [
|
||||
#WWE
|
||||
# WWE
|
||||
('World Wrestling Entertainment', 'https://www.thesportster.com/feed/category/wwe/'),
|
||||
('WWE News', 'https://www.thesportster.com/feed/category/news/'),
|
||||
('WWE Lists', 'https://www.thesportster.com/feed/category/wrestling/'),
|
||||
('WWE Real American Wrestling', 'https://www.thesportster.com/feed/category/wwe-raw/'),
|
||||
('WWE SmackDown', 'https://www.thesportster.com/feed/category/wwe-smackdown/'),
|
||||
('WWE NXT', 'https://www.thesportster.com/feed/category/wwe-nxt/'),
|
||||
#AEW
|
||||
# AEW
|
||||
('All Elite Wrestling', 'https://www.thesportster.com/feed/category/aew/'),
|
||||
('AEW News', 'https://www.thesportster.com/feed/category/news/'),
|
||||
('AEW Lists', 'https://www.thesportster.com/feed/category/wrestling/'),
|
||||
|
@ -23,7 +23,7 @@ class AdvancedUserRecipe1718105400(BasicNewsRecipe):
|
||||
auto_cleanup = True
|
||||
|
||||
feeds = [
|
||||
#Celebrity
|
||||
# Celebrity
|
||||
('Celebrity', 'https://www.thethings.com/feed/category/celebrity/'),
|
||||
('Celebrity News', 'https://www.thethings.com/feed/category/celebrity-news/'),
|
||||
|
||||
|
@ -90,7 +90,7 @@ class PrivateEyeRecipe(BasicNewsRecipe):
|
||||
|
||||
# oldie links/headings often contain the author (in one of various formats
|
||||
# 1. Title. By author
|
||||
#.2. Title by author: subtitle
|
||||
# .2. Title by author: subtitle
|
||||
# 3. Title: author: subtitle
|
||||
title_author_re = re.compile(r'^(.*?)(?:(?: by )|(?:: ))(.*?): (.*?)$')
|
||||
|
||||
@ -212,7 +212,7 @@ class PrivateEyeRecipe(BasicNewsRecipe):
|
||||
r'(?<=[^\.\s])\s*</p>\s*<p>',
|
||||
re.DOTALL | re.IGNORECASE
|
||||
),
|
||||
lambda match: ' ' # space
|
||||
lambda match: ' ' # space
|
||||
),
|
||||
]
|
||||
|
||||
|
@ -9,7 +9,7 @@ from calibre.web.feeds.news import BasicNewsRecipe
|
||||
# Chennai - 'toich'; Chandigarh - 'toicgct'; Jaipur - 'toijc'; Kolkata - 'toikc';
|
||||
# There are others too, try to figure it out, visit toi epaper link.
|
||||
|
||||
le = 'cap' # local edition;
|
||||
le = 'cap' # local edition;
|
||||
|
||||
date0 = date.today().strftime('%Y/%m/%d')
|
||||
|
||||
|
@ -22,10 +22,10 @@ class AdvancedUserRecipe1718128185(BasicNewsRecipe):
|
||||
auto_cleanup = True
|
||||
|
||||
feeds = [
|
||||
#News feeds
|
||||
# News feeds
|
||||
('Car News', 'https://www.topspeed.com/feed/category/car-news/'),
|
||||
('Motorcycle News', 'https://www.topspeed.com/feed/category/motorcycle-news/'),
|
||||
#Guides & Reviews feeds
|
||||
# Guides & Reviews feeds
|
||||
('Car Reviews', 'https://www.topspeed.com/feed/category/car-reviews/'),
|
||||
('Vehicle Comparisons', 'https://www.topspeed.com/feed/category/vehicle-comparisons/'),
|
||||
('Car Guides', 'https://www.topspeed.com/feed/category/car-guides/'),
|
||||
|
@ -6,14 +6,14 @@ from calibre.web.feeds.news import BasicNewsRecipe
|
||||
|
||||
class UAFootball(BasicNewsRecipe):
|
||||
|
||||
#Russian version
|
||||
# Russian version
|
||||
# title = 'UA-\u0424\u0443\u0442\u0431\u043E\u043B'
|
||||
# language = 'ru_UK'
|
||||
# feeds = [
|
||||
# ('\u041D\u043E\u0432\u043E\u0441\u0442\u0438 \u0444\u0443\u0442\u0431\u043E\u043B\u0430', 'https://www.ua-football.com/rss/all.xml')
|
||||
# ]
|
||||
|
||||
#Ukrainian version
|
||||
# Ukrainian version
|
||||
title = 'UA-\u0424\u0443\u0442\u0431\u043E\u043B'
|
||||
description = ('\u0410\u043A\u0442\u0443\u0430\u043B\u044C\u043D\u0456 \u0442\u0435\u043C\u0438'
|
||||
' \u0444\u0443\u0442\u0431\u043E\u043B\u044C\u043D\u043E\u0433\u043E'
|
||||
|
@ -25,7 +25,7 @@ class WSJ(BasicNewsRecipe):
|
||||
resolve_internal_links = True
|
||||
ignore_duplicate_articles = {'url', 'title'}
|
||||
remove_empty_feeds = True
|
||||
oldest_article = 1.2 # days
|
||||
oldest_article = 1.2 # days
|
||||
|
||||
recipe_specific_options = {
|
||||
'days': {
|
||||
|
@ -22,11 +22,11 @@ class AdvancedUserRecipe1718385916(BasicNewsRecipe):
|
||||
auto_cleanup = True
|
||||
|
||||
feeds = [
|
||||
#News & Deals
|
||||
# News & Deals
|
||||
('News', 'https://www.xda-developers.com/feed/news/'),
|
||||
('Computing News', 'https://www.xda-developers.com/feed/category/computing-news/'),
|
||||
('Today’s Deals', 'https://www.xda-developers.com/feed/deals/'),
|
||||
#Reviews
|
||||
# Reviews
|
||||
('Reviews', 'https://www.xda-developers.com/feed/reviews/'),
|
||||
('Laptop Reviews', 'https://www.xda-developers.com/feed/category/computing-reviews/'),
|
||||
('CPU Reviews', 'https://www.xda-developers.com/feed/cpu-reviews/'),
|
||||
@ -34,9 +34,9 @@ class AdvancedUserRecipe1718385916(BasicNewsRecipe):
|
||||
('SSD Reviews', 'https://www.xda-developers.com/feed/ssd-reviews/'),
|
||||
('Phone Reviews', 'https://www.xda-developers.com/feed/phone-reviews/'),
|
||||
('XDA’s Product Review Awards', 'https://www.xda-developers.com/feed/awards/'),
|
||||
#Best Guides
|
||||
# Best Guides
|
||||
("Buyer's Guides", 'https://www.xda-developers.com/feed/buying-guides/'),
|
||||
#Tutorials
|
||||
# Tutorials
|
||||
('Tutorials', 'https://www.xda-developers.com/feed/tutorials/'),
|
||||
('Windows Tutorials', 'https://www.xda-developers.com/feed/windows-tutorials/'),
|
||||
('MacOS Tutorials', 'https://www.xda-developers.com/feed/macos-tutorials/'),
|
||||
|
@ -38,6 +38,7 @@ select = [
|
||||
'RUF047', # needless else
|
||||
'E302', 'E303', 'E304', 'E305', 'W391', # blank-line standard
|
||||
'E111', 'E112', 'E113', 'E117', # code indentation
|
||||
'E114', 'E115', 'E116', 'E261', 'E262', 'E265', # comment formating
|
||||
]
|
||||
|
||||
[lint.per-file-ignores]
|
||||
@ -45,8 +46,10 @@ select = [
|
||||
"manual/plugin_examples/*" = ['UP']
|
||||
"setup/commands.py" = ['RUF022']
|
||||
"src/calibre/*" = ['UP031']
|
||||
"src/calibre/devices/kobo/driver.py" = ['E116']
|
||||
"src/calibre/ebooks/unihandecode/*codepoints.py" = ['E501']
|
||||
"src/calibre/ebooks/metadata/sources/*" = ['UP']
|
||||
"src/calibre/ebooks/pdf/reflow.py" = ['E114']
|
||||
"src/calibre/gui2/store/stores/*" = ['UP']
|
||||
"src/calibre/gui2/tts/manager.py" = ['UP037']
|
||||
"src/calibre/utils/copy_files.py" = ['UP037']
|
||||
|
@ -14,7 +14,7 @@ DATA_DIR_NAME = 'data'
|
||||
DATA_FILE_PATTERN = f'{DATA_DIR_NAME}/**/*'
|
||||
BOOK_ID_PATH_TEMPLATE = ' ({})'
|
||||
RESOURCE_URL_SCHEME = 'calres'
|
||||
TEMPLATE_ICON_INDICATOR = ' template ' # Item values cannot start or end with space
|
||||
TEMPLATE_ICON_INDICATOR = ' template ' # Item values cannot start or end with space
|
||||
|
||||
|
||||
@dataclass
|
||||
|
@ -115,8 +115,8 @@ class ThumbnailCache:
|
||||
thumbnail_size=(100, 100), # The size of the thumbnails, can be changed
|
||||
location=None, # The location for this cache, if None cache_dir() is used
|
||||
test_mode=False, # Used for testing
|
||||
min_disk_cache=0, # If the size is set less than or equal to this value, the cache is disabled.
|
||||
version=0 # Increase this if the cache content format might have changed.
|
||||
min_disk_cache=0, # If the size is set less than or equal to this value, the cache is disabled.
|
||||
version=0 # Increase this if the cache content format might have changed.
|
||||
):
|
||||
self.version = version
|
||||
self.location = os.path.join(location or cache_dir(), name)
|
||||
|
@ -1414,7 +1414,7 @@ class KOBOTOUCH(KOBO):
|
||||
min_dbversion_keywords = 82
|
||||
min_dbversion_seriesid = 136
|
||||
min_dbversion_bookstats = 168
|
||||
min_dbversion_real_bools = 188 # newer (tolino) 5.x fw uses 0 and 1 as boolean values
|
||||
min_dbversion_real_bools = 188 # newer (tolino) 5.x fw uses 0 and 1 as boolean values
|
||||
|
||||
# Starting with firmware version 3.19.x, the last number appears to be is a
|
||||
# build number. A number will be recorded here but it can be safely ignored
|
||||
@ -1443,9 +1443,9 @@ class KOBOTOUCH(KOBO):
|
||||
min_clara2e_fwversion = (4, 33, 19759)
|
||||
min_fwversion_audiobooks = (4, 29, 18730)
|
||||
min_fwversion_bookstats = (4, 32, 19501)
|
||||
min_clarabw_fwversion = (4, 39, 22801) # not sure whether needed
|
||||
min_claracolor_fwversion = (4, 39, 22801) # not sure whether needed
|
||||
min_libracolor_fwversion = (4, 39, 22801) # not sure whether needed
|
||||
min_clarabw_fwversion = (4, 39, 22801) # not sure whether needed
|
||||
min_claracolor_fwversion = (4, 39, 22801) # not sure whether needed
|
||||
min_libracolor_fwversion = (4, 39, 22801) # not sure whether needed
|
||||
|
||||
has_kepubs = True
|
||||
|
||||
|
@ -220,7 +220,7 @@ def mark_sentences_in_html(root, lang: str = '', voice: str = '') -> list[Senten
|
||||
end_offset = len(self.texts[-1].text)
|
||||
assert start_chunk > -1
|
||||
s, e = self.texts[start_chunk], self.texts[end_chunk]
|
||||
if s.child is None: # start in leading text of parent element
|
||||
if s.child is None: # start in leading text of parent element
|
||||
if e is s: # end also in leading text of parent element
|
||||
before, sentence, after = s.text[:start_offset], s.text[start_offset:end_offset], s.text[end_offset:]
|
||||
self.elem.text = before
|
||||
|
@ -236,7 +236,7 @@ class Text(Element):
|
||||
# Or assume any gap = a space?
|
||||
if (self.top <= other.top and self.bottom >= other.bottom) \
|
||||
and abs(other.left - self.right) < 2.0:
|
||||
#and abs(other.left - self.right) < self.average_character_width / 3.0:
|
||||
# and abs(other.left - self.right) < self.average_character_width / 3.0:
|
||||
has_gap = 0
|
||||
else: # Insert n spaces to fill gap. Use TAB? Columns?
|
||||
if other.left < self.right:
|
||||
@ -318,7 +318,7 @@ class Text(Element):
|
||||
and other.right > right_margin - right_margin * RIGHT_FLOAT_FACTOR:
|
||||
has_float = '<span style="float:right">'
|
||||
has_gap = 1
|
||||
#else leave has_gap
|
||||
# else leave has_gap
|
||||
old_float = re.match(r'^(.*)(<span style="float:right">.*)</span>\s*$', self.raw)
|
||||
if old_float:
|
||||
# There is already a float as parts of a line are near the right.
|
||||
@ -336,11 +336,11 @@ class Text(Element):
|
||||
self.text_as_string += ' '
|
||||
self.raw += ' '
|
||||
self.width += self.average_character_width
|
||||
#self.final_width += self.average_character_width
|
||||
# self.final_width += self.average_character_width
|
||||
has_gap -= 1
|
||||
|
||||
self.text_as_string += other.text_as_string
|
||||
#self.width += other.width
|
||||
# self.width += other.width
|
||||
|
||||
# Try to merge href where there are 2 for the same place
|
||||
# Beware multiple hrefs on the same line, but for different places
|
||||
@ -372,9 +372,9 @@ class Text(Element):
|
||||
# Move the <span... after the <a... and remove the </a>
|
||||
self.raw = matchObj.group(1)+matchObj.group(3)+m2+matchObj.group(4)+m5+matchObj.group(6)
|
||||
# This needs more work
|
||||
#if sub_super < 0:
|
||||
# if sub_super < 0:
|
||||
# other.raw = '<sup>' + other.raw + '</sup>'
|
||||
#elif sub_super > 0:
|
||||
# elif sub_super > 0:
|
||||
# other.raw = '<sub>' + other.raw + '</sub>'
|
||||
|
||||
if has_float:
|
||||
@ -383,7 +383,7 @@ class Text(Element):
|
||||
if has_float:
|
||||
self.raw += '</span>'
|
||||
self.set_av_char_width()
|
||||
#self.last_left = other.left
|
||||
# self.last_left = other.left
|
||||
|
||||
def to_html(self):
|
||||
return self.raw
|
||||
@ -782,7 +782,7 @@ class Page:
|
||||
or text.top > self.height \
|
||||
or text.left > self.left+self.width \
|
||||
or text.left < self.left:
|
||||
#and re.match(r'href=', text.raw) is None:
|
||||
# and re.match(r'href=', text.raw) is None:
|
||||
self.texts.remove(text)
|
||||
elif (self.opts.pdf_header_skip <= 0 or text.top >= self.opts.pdf_header_skip) \
|
||||
and (self.opts.pdf_footer_skip <= 0 or text.top <= self.opts.pdf_footer_skip):
|
||||
@ -960,19 +960,19 @@ class Page:
|
||||
and lmargin >= rmargin - rmargin*CENTER_FACTOR \
|
||||
and lmargin <= rmargin + rmargin*CENTER_FACTOR \
|
||||
and '"float:right"' not in t.raw:
|
||||
#and t.left + t.width + t.left >= self.width + l_offset - t.average_character_width \
|
||||
#and t.left + t.width + t.left <= self.width + l_offset + t.average_character_width:
|
||||
# and t.left + t.width + t.left >= self.width + l_offset - t.average_character_width \
|
||||
# and t.left + t.width + t.left <= self.width + l_offset + t.average_character_width:
|
||||
t.align = 'C'
|
||||
# Right aligned if left > FACTOR% of right
|
||||
elif lmargin > indent_max \
|
||||
and lmargin > rmargin*RIGHT_FACTOR:
|
||||
#and t.right >= self.width - t.average_character_width:
|
||||
# and t.right >= self.width - t.average_character_width:
|
||||
# What about right-aligned but indented on right?
|
||||
# What about indented rather than right-aligned?
|
||||
t.align = 'R'
|
||||
if not self.contents:
|
||||
# We can get <a href=...Chapter... Should this check be done?
|
||||
#if 'href=' not in t.raw:
|
||||
# if 'href=' not in t.raw:
|
||||
# Check for Roman numerals as the only thing on a line
|
||||
if re.match(r'^\s*[iIxXvV]+\s*$', t.text_as_string) is not None:
|
||||
t.tag = 'h3'
|
||||
@ -1082,7 +1082,7 @@ class Page:
|
||||
if last_frag is not None \
|
||||
and stats.para_space > 0 \
|
||||
and frag.bottom - last_frag.bottom > stats.para_space*SECTION_FACTOR:
|
||||
#and frag.top - last_frag.bottom > frag.height + stats.line_space + (stats.line_space*LINE_FACTOR):
|
||||
# and frag.top - last_frag.bottom > frag.height + stats.line_space + (stats.line_space*LINE_FACTOR):
|
||||
frag.blank_line_before = 1
|
||||
last_frag = frag
|
||||
tind += 1
|
||||
@ -1104,8 +1104,8 @@ class Page:
|
||||
# There could be fragments which are spread out, so join_fragments has not coalesced them
|
||||
# Not sure that this would work as it relies on the first fragment matching regex
|
||||
t = self.texts[0]
|
||||
#match = self.find_match(t)
|
||||
#while match is not None:
|
||||
# match = self.find_match(t)
|
||||
# while match is not None:
|
||||
# self.texts.remove(match)
|
||||
# match = self.find_match(t)
|
||||
self.texts.remove(t)
|
||||
@ -1119,8 +1119,8 @@ class Page:
|
||||
if re.match(opts.pdf_footer_regex, self.texts[-1].text_as_string) is not None :
|
||||
# There could be fragments which are spread out, so join_fragments has not coalesced them
|
||||
t = self.texts[-1]
|
||||
#match = self.find_match(t)
|
||||
#while match is not None:
|
||||
# match = self.find_match(t)
|
||||
# while match is not None:
|
||||
# self.texts.remove(match)
|
||||
# match = self.find_match(t)
|
||||
self.texts.remove(t)
|
||||
@ -1140,7 +1140,7 @@ class Page:
|
||||
|
||||
def find_margins(self, tops, indents, line_spaces, bottoms, rights):
|
||||
|
||||
#from collections import Counter
|
||||
# from collections import Counter
|
||||
|
||||
# Should check for left margin and indent for this page
|
||||
# Find the most used top, left margins, and gaps between lines
|
||||
@ -1149,7 +1149,7 @@ class Page:
|
||||
max_right = 0
|
||||
max_space = 0
|
||||
last_top = 0
|
||||
#last_bottom = 0
|
||||
# last_bottom = 0
|
||||
first = True
|
||||
for text in self.texts:
|
||||
top = text.top
|
||||
@ -1341,10 +1341,10 @@ class Page:
|
||||
|
||||
self.check_centered(stats)
|
||||
|
||||
#self.elements = list(self.texts)
|
||||
#for img in page.xpath('descendant::img'):
|
||||
# self.elements = list(self.texts)
|
||||
# for img in page.xpath('descendant::img'):
|
||||
# self.elements.append(Image(img, self.opts, self.log, idc))
|
||||
#self.elements.sort(cmp=lambda x,y:cmp(x.top, y.top))
|
||||
# self.elements.sort(cmp=lambda x,y:cmp(x.top, y.top))
|
||||
|
||||
return
|
||||
# NOT IMPLEMENTED
|
||||
@ -1391,7 +1391,7 @@ class Page:
|
||||
elif text.indented > 0:
|
||||
ans[-1] += ' style="text-indent:'
|
||||
ans[-1] += str(text.indented)
|
||||
#ans[-1] += '1'
|
||||
# ans[-1] += '1'
|
||||
ans[-1] += 'em"'
|
||||
# The margins need more work. e.g. can have indented + left + right
|
||||
elif text.margin_left > 0:
|
||||
@ -1427,7 +1427,7 @@ class Page:
|
||||
class PDFDocument:
|
||||
|
||||
def __init__(self, xml, opts, log):
|
||||
#from calibre.rpdb import set_trace; set_trace()
|
||||
# from calibre.rpdb import set_trace; set_trace()
|
||||
|
||||
self.opts, self.log = opts, log
|
||||
|
||||
@ -1451,11 +1451,11 @@ class PDFDocument:
|
||||
self.font_map[self.fonts[-1].id] = self.fonts[-1]
|
||||
|
||||
self.pages = []
|
||||
#self.page_map = {}
|
||||
# self.page_map = {}
|
||||
|
||||
for page in self.root.xpath('//page'):
|
||||
page = Page(page, self.font_map, opts, log, idc)
|
||||
#self.page_map[page.id] = page
|
||||
# self.page_map[page.id] = page
|
||||
self.pages.append(page)
|
||||
|
||||
self.tops = {}
|
||||
@ -1496,7 +1496,7 @@ class PDFDocument:
|
||||
# Join paragraphs across page boundaries
|
||||
self.merge_pages(idc)
|
||||
|
||||
#self.linearize()
|
||||
# self.linearize()
|
||||
self.render()
|
||||
|
||||
def collect_font_statistics(self):
|
||||
@ -1752,7 +1752,7 @@ class PDFDocument:
|
||||
bcount = 0
|
||||
for b in self.bottoms:
|
||||
if bcount < self.bottoms[b]:
|
||||
#and b > self.stats.bottom*0.9:
|
||||
# and b > self.stats.bottom*0.9:
|
||||
bcount = self.bottoms[b]
|
||||
if b > self.stats.bottom:
|
||||
self.stats.bottom = b
|
||||
@ -1801,7 +1801,7 @@ class PDFDocument:
|
||||
or page.texts[head_ind].top > page.height/2:
|
||||
break # Short page
|
||||
t = page.texts[head_ind].text_as_string
|
||||
#if len(page.texts) > 1 and page.texts[0].top == page.texts[1].top:
|
||||
# if len(page.texts) > 1 and page.texts[0].top == page.texts[1].top:
|
||||
# t += ' ' + page.texts[1].text_as_string
|
||||
if len(head_text[head_ind]) == 0:
|
||||
head_text[head_ind] = t
|
||||
@ -1834,7 +1834,7 @@ class PDFDocument:
|
||||
or page.texts[-foot_ind-1].top < page.height/2:
|
||||
break # Short page
|
||||
t = page.texts[-foot_ind-1].text_as_string
|
||||
#if len(page.texts) > 1 and page.texts[-1].top == page.texts[-2].top:
|
||||
# if len(page.texts) > 1 and page.texts[-1].top == page.texts[-2].top:
|
||||
# t += ' ' + page.texts[-2].text_as_string
|
||||
if len(foot_text[foot_ind]) == 0:
|
||||
foot_text[foot_ind] = t
|
||||
@ -2040,7 +2040,7 @@ class PDFDocument:
|
||||
# Have we removed everything from this page (well, all texts and images)
|
||||
if merged_page.is_empty:
|
||||
# Empty page does/may not actually mean blank line
|
||||
#candidate.texts[-1].blank_line_before = 1
|
||||
# candidate.texts[-1].blank_line_before = 1
|
||||
# If pages are merged, and the merged page gets removed (as here),
|
||||
# and the next page is short (forced page break),
|
||||
# then the merge would fail when this loop restarts.
|
||||
|
@ -75,12 +75,12 @@ class Jadecoder(Unidecoder):
|
||||
with warnings.catch_warnings():
|
||||
warnings.simplefilter('ignore')
|
||||
self.kakasi = kakasi()
|
||||
self.kakasi.setMode('H','a') # Hiragana to ascii, default: no conversion
|
||||
self.kakasi.setMode('K','a') # Katakana to ascii, default: no conversion
|
||||
self.kakasi.setMode('J','a') # Japanese to ascii, default: no conversion
|
||||
self.kakasi.setMode('r','Hepburn') # default: use Hepburn Roman table
|
||||
self.kakasi.setMode('s', True) # add space, default: no separator
|
||||
self.kakasi.setMode('C', True) # capitalize, default: no capitalize
|
||||
self.kakasi.setMode('H','a') # Hiragana to ascii, default: no conversion
|
||||
self.kakasi.setMode('K','a') # Katakana to ascii, default: no conversion
|
||||
self.kakasi.setMode('J','a') # Japanese to ascii, default: no conversion
|
||||
self.kakasi.setMode('r','Hepburn') # default: use Hepburn Roman table
|
||||
self.kakasi.setMode('s', True) # add space, default: no separator
|
||||
self.kakasi.setMode('C', True) # capitalize, default: no capitalize
|
||||
self.conv = self.kakasi.getConverter()
|
||||
|
||||
def decode(self, text):
|
||||
|
@ -63,7 +63,7 @@ class AllGUIActions(InterfaceAction):
|
||||
m = self.qaction.menu()
|
||||
m.clear()
|
||||
|
||||
name_data = {} # A dict of display names to actions data
|
||||
name_data = {} # A dict of display names to actions data
|
||||
|
||||
# Use model data from Preferences / Toolbars, with location 'toolbar' or
|
||||
# 'toolbar-device' depending on whether a device is connected.
|
||||
@ -71,7 +71,7 @@ class AllGUIActions(InterfaceAction):
|
||||
for model in (AllModel(location, self.gui), CurrentModel(location, self.gui)):
|
||||
for i in range(0, model.rowCount(None)):
|
||||
dex = model.index(i)
|
||||
name = model.names((dex,))[0] # this is the action name
|
||||
name = model.names((dex,))[0] # this is the action name
|
||||
if name is not None and not name.startswith('---'):
|
||||
name_data[model.data(dex, Qt.ItemDataRole.DisplayRole)] = {
|
||||
'action': model.name_to_action(name, self.gui),
|
||||
@ -116,7 +116,7 @@ class AllGUIActions(InterfaceAction):
|
||||
def add_action(menu, display_name):
|
||||
shortcuts = shortcut_map.get(display_name.lower(), '')
|
||||
act = name_data[display_name]['action']
|
||||
if not hasattr(act, 'popup_type'): # FakeAction
|
||||
if not hasattr(act, 'popup_type'): # FakeAction
|
||||
return
|
||||
menu_text = f'{display_name}{shortcuts}'
|
||||
icon = name_data[display_name]['icon']
|
||||
@ -137,7 +137,7 @@ class AllGUIActions(InterfaceAction):
|
||||
# Finally the real work, building the action menu. Partition long lists
|
||||
# of actions into mostly-equal-length sublists of some arbitrary length.
|
||||
def partition(names):
|
||||
max_in_partition = 10 # arbitrary
|
||||
max_in_partition = 10 # arbitrary
|
||||
if len(names) >= max_in_partition:
|
||||
partition_count = ceil(len(names) / max_in_partition)
|
||||
step = int(ceil(len(names) / partition_count))
|
||||
|
@ -619,7 +619,7 @@ def create_copy_links(menu, data=None):
|
||||
all_links.append(url)
|
||||
copy_to_clipboard_action(text, url)
|
||||
|
||||
sep = menu.addSeparator() # Note: separators are really actions
|
||||
sep = menu.addSeparator() # Note: separators are really actions
|
||||
|
||||
link_action(_('Link to show book in calibre'), f'calibre://show-book/{library_id}/{book_id}')
|
||||
link_action(_('Link to show book details in a popup window'),
|
||||
|
@ -357,7 +357,7 @@ class BookInfo(QDialog, DropMixin):
|
||||
ret = QDialog.done(self, r)
|
||||
if self.slave_connected:
|
||||
self.view.model().new_bookdisplay_data.disconnect(self.slave)
|
||||
self.slave_debounce_timer.stop() # OK if it isn't running
|
||||
self.slave_debounce_timer.stop() # OK if it isn't running
|
||||
self.view = self.link_delegate = self.gui = None
|
||||
self.closed.emit(self)
|
||||
return ret
|
||||
@ -383,7 +383,7 @@ class BookInfo(QDialog, DropMixin):
|
||||
|
||||
def slave(self, mi):
|
||||
self._mi_for_debounce = mi
|
||||
self.slave_debounce_timer.start() # start() will automatically reset the timer if it was already running
|
||||
self.slave_debounce_timer.start() # start() will automatically reset the timer if it was already running
|
||||
|
||||
def _debounce_refresh(self):
|
||||
mi, self._mi_for_debounce = self._mi_for_debounce, None
|
||||
|
@ -317,7 +317,7 @@ class EditAuthorsDialog(QDialog, Ui_EditAuthorsDialog):
|
||||
self.notes_utilities.set_icon(note_item, id_, id_ in all_items_that_have_notes)
|
||||
row += 1
|
||||
|
||||
headers = { # this depends on the dict being ordered, which is true from python 3.7
|
||||
headers = { # this depends on the dict being ordered, which is true from python 3.7
|
||||
_('Author'): _('Name of the author'),
|
||||
_('Author sort'): _('Value used to sort this author'),
|
||||
_('Count'): _('Count of books with this author'),
|
||||
|
@ -207,7 +207,7 @@ def main():
|
||||
|
||||
with TemporaryDirectory() as tdir:
|
||||
app = Application([])
|
||||
db = LibraryDatabase(tdir) # needed to load formatter_funcs
|
||||
db = LibraryDatabase(tdir) # needed to load formatter_funcs
|
||||
d = FFDocEditor(None)
|
||||
d.exec()
|
||||
del db
|
||||
|
@ -731,7 +731,7 @@ class TagListEditor(QDialog, Ui_TagListEditor):
|
||||
tags = self.ordered_tags
|
||||
|
||||
select_item = None
|
||||
tooltips = ( # must be in the same order as the columns in the table
|
||||
tooltips = ( # must be in the same order as the columns in the table
|
||||
_('Name of the item'),
|
||||
_('Count of books with this item'),
|
||||
_('Value of the item before it was edited'),
|
||||
|
@ -25,7 +25,7 @@ class ExtraFilesWatcher(QObject):
|
||||
|
||||
books_changed = pyqtSignal(object)
|
||||
WATCH_FOR = 300 # seconds
|
||||
TICK_INTERVAL = 1 # seconds
|
||||
TICK_INTERVAL = 1 # seconds
|
||||
|
||||
def __init__(self, parent=None):
|
||||
super().__init__(parent)
|
||||
|
@ -1005,7 +1005,7 @@ class GridView(QListView):
|
||||
if db is None:
|
||||
return None
|
||||
tc = self.thumbnail_cache
|
||||
cdata, timestamp = tc[book_id] # None, None if not cached.
|
||||
cdata, timestamp = tc[book_id] # None, None if not cached.
|
||||
if timestamp is None:
|
||||
# Cover not in cache. Try to read the cover from the library.
|
||||
has_cover, cdata, timestamp = db.new_api.cover_or_cache(book_id, 0, as_what='pil_image')
|
||||
|
@ -130,15 +130,15 @@ class MarkdownHighlighter(QSyntaxHighlighter):
|
||||
cursor = QTextCursor(self.document())
|
||||
bf = cursor.blockFormat()
|
||||
|
||||
#Block quotes can contain all elements so process it first, internally process recursively and return
|
||||
# Block quotes can contain all elements so process it first, internally process recursively and return
|
||||
if self.highlightBlockQuote(text, cursor, bf):
|
||||
return
|
||||
|
||||
#If empty line no need to check for below elements just return
|
||||
# If empty line no need to check for below elements just return
|
||||
if self.highlightEmptyLine(text, cursor, bf):
|
||||
return
|
||||
|
||||
#If horizontal line, look at pevious line to see if its a header, process and return
|
||||
# If horizontal line, look at pevious line to see if its a header, process and return
|
||||
if self.highlightHorizontalLine(text, cursor, bf):
|
||||
return
|
||||
|
||||
@ -186,9 +186,9 @@ class MarkdownHighlighter(QSyntaxHighlighter):
|
||||
prev = prevBlock.text()
|
||||
prevAscii = str(prev.replace('\u2029','\n'))
|
||||
if self.offset == 0 and prevAscii.strip():
|
||||
#print('Its a header')
|
||||
# print('Its a header')
|
||||
prevCursor.select(QTextCursor.SelectionType.LineUnderCursor)
|
||||
#prevCursor.setCharFormat(self.MARKDOWN_KWS_FORMAT['Header'])
|
||||
# prevCursor.setCharFormat(self.MARKDOWN_KWS_FORMAT['Header'])
|
||||
formatRange = QTextLayout.FormatRange()
|
||||
formatRange.format = self.MARKDOWN_KWS_FORMAT['Header']
|
||||
formatRange.length = prevCursor.block().length()
|
||||
@ -205,9 +205,9 @@ class MarkdownHighlighter(QSyntaxHighlighter):
|
||||
def highlightHeader(self, text, cursor, bf):
|
||||
found = False
|
||||
for mo in re.finditer(self.MARKDOWN_KEYS_REGEX['Header'],text):
|
||||
#bf.setBackground(QBrush(QColor(7,54,65)))
|
||||
#cursor.movePosition(QTextCursor.End)
|
||||
#cursor.mergeBlockFormat(bf)
|
||||
# bf.setBackground(QBrush(QColor(7,54,65)))
|
||||
# cursor.movePosition(QTextCursor.End)
|
||||
# cursor.mergeBlockFormat(bf)
|
||||
self.setFormat(self.offset+ mo.start(), mo.end() - mo.start(), self.MARKDOWN_KWS_FORMAT['Header'])
|
||||
found = True
|
||||
return found
|
||||
@ -257,7 +257,7 @@ class MarkdownHighlighter(QSyntaxHighlighter):
|
||||
return self._highlightBoldEmphasis(text[offset:], cursor, bf, offset, False, False)
|
||||
|
||||
def _highlightBoldEmphasis(self, text, cursor, bf, offset, bold, emphasis):
|
||||
#detect and apply imbricated Bold/Emphasis
|
||||
# detect and apply imbricated Bold/Emphasis
|
||||
found = False
|
||||
|
||||
def apply(match, bold, emphasis):
|
||||
|
@ -541,7 +541,7 @@ class CreateCustomColumn(QDialog):
|
||||
self.bool_button_group.setFocusProxy(button)
|
||||
|
||||
def composite_show_in_comments_clicked(self, state):
|
||||
if state == Qt.CheckState.Checked.value: # state is passed as an int
|
||||
if state == Qt.CheckState.Checked.value: # state is passed as an int
|
||||
self.composite_sort_by.setEnabled(False)
|
||||
self.composite_sort_by_label.setEnabled(False)
|
||||
self.composite_make_category.setEnabled(False)
|
||||
|
@ -25,7 +25,7 @@ class CoverView(ConfigTabWidget, Ui_Form):
|
||||
r('cover_flow_queue_length', config, restart_required=True)
|
||||
r('cover_browser_reflections', gprefs)
|
||||
r('cover_browser_narrow_view_position', gprefs,
|
||||
choices=[(_('Automatic'), 'automatic'), # Automatic must be first
|
||||
choices=[(_('Automatic'), 'automatic'), # Automatic must be first
|
||||
(_('On top'), 'on_top'),
|
||||
(_('On right'), 'on_right')])
|
||||
r('cover_browser_title_template', db.prefs)
|
||||
|
@ -170,7 +170,7 @@ class TagBrowserMixin: # {{{
|
||||
current_row_id = self.library_view.current_id
|
||||
self.library_view.model().refresh(reset=True)
|
||||
self.library_view.model().research(reset=False)
|
||||
self.library_view.current_id = current_row_id # the setter checks for None
|
||||
self.library_view.current_id = current_row_id # the setter checks for None
|
||||
|
||||
def do_restriction_error(self, e):
|
||||
error_dialog(self.tags_view, _('Invalid search restriction'),
|
||||
|
@ -735,9 +735,9 @@ class TagsView(QTreeView): # {{{
|
||||
else:
|
||||
# Already have an icon. User wants to change whether it applies to children
|
||||
icon_file_name = desired_file_name
|
||||
if index is None: # category icon
|
||||
if index is None: # category icon
|
||||
self._model.set_custom_category_icon(key, str(icon_file_name))
|
||||
else: # value icon
|
||||
else: # value icon
|
||||
self._model.set_value_icon(key, item_val, icon_file_name, bool(for_children))
|
||||
self.recount()
|
||||
return
|
||||
|
@ -488,7 +488,7 @@ class SaveLoadMixin:
|
||||
self.PREFS_OBJECT[text] = self.rules
|
||||
self.loaded_ruleset = text
|
||||
self.ruleset_changed.emit()
|
||||
elif text in self.PREFS_OBJECT: # Don't think we can get here because 'if rules:' is always True
|
||||
elif text in self.PREFS_OBJECT: # Don't think we can get here because 'if rules:' is always True
|
||||
del self.PREFS_OBJECT[text]
|
||||
if self.loaded_ruleset == text:
|
||||
self.loaded_ruleset = ''
|
||||
|
@ -1009,7 +1009,7 @@ class Main(MainWindow, MainWindowMixin, DeviceMixin, EmailMixin, # {{{
|
||||
if db.new_api.pref('virtual_lib_on_startup'):
|
||||
self.apply_virtual_library(db.new_api.pref('virtual_lib_on_startup'))
|
||||
self.rebuild_vl_tabs()
|
||||
self._restore_tb_expansion_state() # Do this before plugins library_changed()
|
||||
self._restore_tb_expansion_state() # Do this before plugins library_changed()
|
||||
for action in self.iactions.values():
|
||||
try:
|
||||
action.library_changed(db)
|
||||
|
@ -161,7 +161,7 @@ def qt_to_dt(qdate_or_qdatetime, as_utc=True):
|
||||
o = qdate_or_qdatetime
|
||||
if o is None or is_date_undefined(qdate_or_qdatetime):
|
||||
return UNDEFINED_DATE
|
||||
if hasattr(o, 'toUTC'): # QDateTime
|
||||
if hasattr(o, 'toUTC'): # QDateTime
|
||||
def c(o: QDateTime, tz=utc_tz):
|
||||
d, t = o.date(), o.time()
|
||||
try:
|
||||
|
@ -486,7 +486,7 @@ class FFMLProcessor:
|
||||
|
||||
# ============== Internal methods =================
|
||||
|
||||
keywords = {'``': NodeKinds.CODE_TEXT, # must be before '`'
|
||||
keywords = {'``': NodeKinds.CODE_TEXT, # must be before '`'
|
||||
'`': NodeKinds.ITALIC_TEXT,
|
||||
'[B]': NodeKinds.BOLD_TEXT,
|
||||
'[CODE]': NodeKinds.CODE_BLOCK,
|
||||
|
@ -680,7 +680,7 @@ if iswindows:
|
||||
except FileNotFoundError:
|
||||
return path
|
||||
except OSError as e:
|
||||
if e.winerror == 123: # ERR_INVALID_NAME
|
||||
if e.winerror == 123: # ERR_INVALID_NAME
|
||||
return path
|
||||
raise
|
||||
|
||||
|
@ -1403,7 +1403,7 @@ class _Interpreter:
|
||||
if res is None or not isinstance(res, (list, tuple, set, dict)):
|
||||
self.error(_("Field '{0}' is either not a field or not a list").format(right), prog.line_number)
|
||||
pat = re.compile(left, flags=re.I)
|
||||
if isinstance(res, dict): # identifiers
|
||||
if isinstance(res, dict): # identifiers
|
||||
for k,v in res.items():
|
||||
if re.search(pat, f'{k}:{v}'):
|
||||
return '1'
|
||||
|
Loading…
x
Reference in New Issue
Block a user