From 0e97f36dea0a97c80bf771ff46ac19c75f4838dd Mon Sep 17 00:00:00 2001 From: "ilker m. sitki" Date: Tue, 3 Sep 2024 22:23:42 +0200 Subject: [PATCH] add computer weekly recipe Changes to be committed: new file: computer_weekly.recipe --- recipes/computer_weekly.recipe | 41 ++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 recipes/computer_weekly.recipe diff --git a/recipes/computer_weekly.recipe b/recipes/computer_weekly.recipe new file mode 100644 index 0000000000..03b3d6f253 --- /dev/null +++ b/recipes/computer_weekly.recipe @@ -0,0 +1,41 @@ +#!/usr/bin/env python +# vim:fileencoding=utf-8 +from calibre.web.feeds.news import BasicNewsRecipe + +class ComputerWeekly(BasicNewsRecipe): + title = 'ComputerWeekly' + oldest_article = 7 + max_articles_per_feed = 100 + remove_javascript = True + no_stylesheets = True + + feeds = [ + ('IT careers and IT skills', 'https://www.computerweekly.com/rss/IT-careers-and-IT-skills.xml'), + ('IT hardware', 'https://www.computerweekly.com/rss/IT-hardware.xml'), + ('IT management', 'https://www.computerweekly.com/rss/IT-management.xml'), + ('IT security', 'https://www.computerweekly.com/rss/IT-security.xml'), + ('Networking and communication', 'https://www.computerweekly.com/rss/Networking-and-communication.xml'), + ('Storage', 'https://www.computerweekly.com/rss/Storage.xml'), + ('Mobile technology', 'https://www.computerweekly.com/rss/Mobile-technology.xml'), + ('Internet technology', 'https://www.computerweekly.com/rss/Internet-technology.xml'), + ('IT services and outsourcing', 'https://www.computerweekly.com/rss/IT-services-and-outsourcing.xml'), + ('Financial services IT news', 'https://www.computerweekly.com/rss/Financial-services-IT-news.xml'), + ('Public sector IT news', 'https://www.computerweekly.com/rss/Public-sector-IT-news.xml'), + ('Enterprise software', 'https://www.computerweekly.com/rss/Enterprise-software.xml'), + ('SME IT news' , 'https://www.computerweekly.com/rss/SME-IT-news.xml'), + ('Datacenter and cloud computing', 'https://www.computerweekly.com/rss/Datacentre-and-cloud-computing.xml'), + ('Storage', 'https://www.computerweekly.com/rss/Storage.xml'), + ('Information Management', 'https://www.computerweekly.com/rss/Information-management.xml'), + ('Nordics', 'https://www.computerweekly.com/rss/Nordics.xml'), + ('ANZ', 'https://www.computerweekly.com/rss/ANZ.xml'), + ('ASEAN', 'https://www.computerweekly.com/rss/ASEAN.xml'), + ('Asia Pacific', 'https://www.computerweekly.com/rss/Asia-Pacific.xml'), + ('Google Editor Picks', 'https://www.computerweekly.com/editorspicks'), + ] + + keep_only_tags = [ + dict(name='h1', attrs={'class': 'main-article-title'}), + dict(name='h2', attrs={'class': 'main-article-subtitle'}), + dict(name='div', attrs={'class': 'main-article-author'}), + dict(name='section', attrs={'id': 'content-body'}), + ]