Debian Codegraph @

recipes/computer_weekly.recipe

raw
1 #!/usr/bin/env python
2 # vim:fileencoding=utf-8
3 from calibre.web.feeds.news import BasicNewsRecipe
4
5
6 class ComputerWeekly(BasicNewsRecipe):
7 title = 'ComputerWeekly'
8 __author__ = 'İlker Melik Sıtkı'
9 oldest_article = 7
10 max_articles_per_feed = 100
11 language = 'en'
12 remove_javascript = True
13 no_stylesheets = True
14
15 feeds = [
16 ('IT careers and IT skills', 'https://www.computerweekly.com/rss/IT-careers-and-IT-skills.xml'),
17 ('IT hardware', 'https://www.computerweekly.com/rss/IT-hardware.xml'),
18 ('IT management', 'https://www.computerweekly.com/rss/IT-management.xml'),
19 ('IT security', 'https://www.computerweekly.com/rss/IT-security.xml'),
20 ('Networking and communication', 'https://www.computerweekly.com/rss/Networking-and-communication.xml'),
21 ('Storage', 'https://www.computerweekly.com/rss/Storage.xml'),
22 ('Mobile technology', 'https://www.computerweekly.com/rss/Mobile-technology.xml'),
23 ('Internet technology', 'https://www.computerweekly.com/rss/Internet-technology.xml'),
24 ('IT services and outsourcing', 'https://www.computerweekly.com/rss/IT-services-and-outsourcing.xml'),
25 ('Financial services IT news', 'https://www.computerweekly.com/rss/Financial-services-IT-news.xml'),
26 ('Public sector IT news', 'https://www.computerweekly.com/rss/Public-sector-IT-news.xml'),
27 ('Enterprise software', 'https://www.computerweekly.com/rss/Enterprise-software.xml'),
28 ('SME IT news', 'https://www.computerweekly.com/rss/SME-IT-news.xml'),
29 ('Datacenter and cloud computing', 'https://www.computerweekly.com/rss/Datacentre-and-cloud-computing.xml'),
30 ('Storage', 'https://www.computerweekly.com/rss/Storage.xml'),
31 ('Information Management', 'https://www.computerweekly.com/rss/Information-management.xml'),
32 ('Nordics', 'https://www.computerweekly.com/rss/Nordics.xml'),
33 ('ANZ', 'https://www.computerweekly.com/rss/ANZ.xml'),
34 ('ASEAN', 'https://www.computerweekly.com/rss/ASEAN.xml'),
35 ('Asia Pacific', 'https://www.computerweekly.com/rss/Asia-Pacific.xml'),
36 ('Google Editor Picks', 'https://www.computerweekly.com/editorspicks'),
37 ]
38
39 keep_only_tags = [
40 dict(name='h1', attrs={'class': 'main-article-title'}),
41 dict(name='h2', attrs={'class': 'main-article-subtitle'}),
42 dict(name='div', attrs={'class': 'main-article-author'}),
43 dict(name='section', attrs={'id': 'content-body'}),
44 ]