mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Remove cruft from Quanta Magazine articles
This commit is contained in:
parent
57c8db0d13
commit
c2237c2efa
@ -1,17 +1,28 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# vim:fileencoding=utf-8
|
# vim:fileencoding=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
|
from calibre.web.feeds.news import BasicNewsRecipe
|
||||||
|
|
||||||
|
|
||||||
class Quanta(BasicNewsRecipe):
|
class Quanta(BasicNewsRecipe):
|
||||||
title = 'Quanta Magazine'
|
title = "Quanta Magazine"
|
||||||
|
description = "Articles from the magazine. Please set to download weekly."
|
||||||
|
|
||||||
oldest_article = 7
|
oldest_article = 7
|
||||||
max_articles_per_feed = 100
|
max_articles_per_feed = 100
|
||||||
language = 'en'
|
language = 'en'
|
||||||
__author__ = 'lui1'
|
|
||||||
encoding = 'UTF-8'
|
encoding = 'UTF-8'
|
||||||
|
publication_type = "blog"
|
||||||
|
cover_url = "https://d2r55xnwy6nx47.cloudfront.net/uploads/2017/05/logo.png"
|
||||||
|
|
||||||
feeds = [
|
feeds = [
|
||||||
('Articles', 'https://api.quantamagazine.org/feed/'),
|
('Articles', 'https://api.quantamagazine.org/feed/'),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
keep_only_tags = [
|
||||||
|
dict(name="div", attrs={"id": "postBody"}),
|
||||||
|
]
|
||||||
|
|
||||||
|
remove_tags = [
|
||||||
|
dict(name="div", attrs={"class": "post__sidebar__content"}),
|
||||||
|
]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user