Commit 2ecc8eae authored by Kiste's avatar Kiste
Browse files

Fix heise

parent b53359c1
......@@ -119,7 +119,8 @@ def do_feed(url, rules_path, verbose):
soup = do_soup(soup, url_rules, url, verbose)
if not soup:
fe.content('Error doing the soup!')
print('Error doing the soup in\n' + entry['link'])
if verbose:
print('>>>Error doing the soup!')
continue
if comments:
for e in comments:
......@@ -127,7 +128,7 @@ def do_feed(url, rules_path, verbose):
if verbose:
print('Appending comments')
cleanup_soup(soup, url_rules, verbose)
fe.content(str(soup), type='html')
fe.content(str(soup.prettify()), type='html')
return fg
......
......@@ -27,9 +27,30 @@
"article": "article",
"next": "a[id='atoc_next']"
},
"https://www.heise.de/((newsticker|foto|security|mac-and-i|ix|make)/meldung|meldung|security/artikel)/.*": {
"https://www.heise.de/(|newsticker/)meldung/.*": {
"article": "article",
"decompose": [
"div[class='publish-info']",
"h2[class='article__heading']",
"div[class='creator-info']",
"figure",
"script",
"noscript",
"style",
"aside[class='top-ad-container']",
"section[class='sidebar']",
"div[class*='akwa-ad-container']",
"a[name='meldung.newsticker.bottom.zurstartseite']",
"aside[class='akwa-ad-container']",
"a-paternoster",
"a-script",
"a-collapse",
"div[class*='gallery']"
]
},
"https://www.heise.de/((foto|security|mac-and-i|ix|make)/meldung|(make|security)/artikel)/.*": {
"article": "div[class='article-content']",
"comments": "footer[class='article-footer']",
"comments": "footer[class='beitragsfooter']",
"reformat": [
{
"search": "html?.+=.+",
......@@ -53,19 +74,20 @@
"aside[class='a-pvg']",
"iframe",
"div[class*='a-inline-textbox']",
"a-collapse-group[class='article-footer__interaction']",
"div[id='share-target']",
"div[id='subscribe-target']",
"aside[class='topics']",
"a[class='article-footer__to-homepage']",
"aside[class*='pvg-techdata']",
"div[class='article-footer__related-forum']"
"p[class='beitragsfooter_themen_foren']",
"div[class='shariff clear']",
"a[class='beitragsfooter_permalink']",
"a[class='beitragsfooter_printversion']",
"aside[class='beitragsfooter-themenseiten']"
],
"next": "a[class='seite_weiter']"
},
"https://www.heise.de/developer/meldung/.*": {
"article": "article",
"comments": "div[class='article-footer__content']",
"decompose": [
"figure",
"div[class='publish-info']",
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment