| 1 |
#!/usr/bin/env python |
| 2 |
# vim:fileencoding=utf-8 |
| 3 |
|
| 4 |
from calibre.web.feeds.news import BasicNewsRecipe |
| 5 |
|
| 6 |
|
| 7 |
class Bellingcat(BasicNewsRecipe): |
| 8 |
title = 'Debunking Denialism' |
| 9 |
__author__ = 'bugmen00t' |
| 10 |
description = 'Debunking Denialism is a website dedicated to the refutation of pseudoscience and denialism by applying scientific skepticism and defending evidence-based science. Fighting pseudoscience and quackery with reason and evidence.' # noqa: E501 |
| 11 |
publisher = 'Debunking Denialism' |
| 12 |
category = 'blog' |
| 13 |
cover_url = 'https://i0.wp.com/debunkingdenialism.com/wp-content/uploads/2017/06/cropped-newestblavatar.jpg' |
| 14 |
language = 'en' |
| 15 |
no_stylesheets = True |
| 16 |
remove_javascript = False |
| 17 |
auto_cleanup = False |
| 18 |
oldest_article = 60 |
| 19 |
max_articles_per_feed = 10 |
| 20 |
|
| 21 |
remove_tags_before = dict(name='article') |
| 22 |
|
| 23 |
remove_tags_after = dict(name='article') |
| 24 |
|
| 25 |
remove_tags = [ |
| 26 |
dict(name='div', attrs={'class': 'above-entry-meta'}), |
| 27 |
dict(name='time', attrs={'class': 'updated'}), |
| 28 |
dict(name='p', attrs={'class': 'ddtag'}), |
| 29 |
dict(name='div', attrs={'class': 'sharedaddy sd-sharing-enabled'}), |
| 30 |
dict(name='div', attrs={'class': 'sharedaddy sd-block sd-like jetpack-likes-widget-wrapper jetpack-likes-widget-unloaded'}), |
| 31 |
] |
| 32 |
|
| 33 |
feeds = [('Debunking Denialism', 'https://debunkingdenialism.com/feed/')] |
| 34 |
|
| 35 |
def preprocess_html(self, soup): |
| 36 |
for img in soup.findAll('img', attrs={'data-orig-file': True}): |
| 37 |
img['src'] = img['data-orig-file'] |
| 38 |
return soup |