| 1 |
#!/usr/bin/env python |
| 2 |
# vim:fileencoding=utf-8 |
| 3 |
|
| 4 |
from __future__ import absolute_import, division, print_function, unicode_literals |
| 5 |
|
| 6 |
from calibre.web.feeds.news import BasicNewsRecipe |
| 7 |
|
| 8 |
|
| 9 |
class Quanta(BasicNewsRecipe): |
| 10 |
title = 'Quanta Magazine' |
| 11 |
__author__ = 'lui1' |
| 12 |
description = 'Articles from the magazine. Please set to download weekly.' |
| 13 |
|
| 14 |
oldest_article = 7 |
| 15 |
max_articles_per_feed = 100 |
| 16 |
language = 'en' |
| 17 |
encoding = 'UTF-8' |
| 18 |
publication_type = 'blog' |
| 19 |
cover_url = 'https://d2r55xnwy6nx47.cloudfront.net/uploads/2017/05/logo.png' |
| 20 |
|
| 21 |
feeds = [ |
| 22 |
('Articles', 'https://api.quantamagazine.org/feed/'), |
| 23 |
] |
| 24 |
|
| 25 |
keep_only_tags = [ |
| 26 |
dict(name='div', attrs={'id': 'postBody'}), |
| 27 |
] |
| 28 |
|
| 29 |
remove_tags = [ |
| 30 |
dict(name='div', attrs={'class': 'post__sidebar__content'}), |
| 31 |
] |