This commit is contained in:
Kovid Goyal 2024-09-06 07:07:21 +05:30
parent 82eed9cad3
commit 961ef505d1
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
3 changed files with 4 additions and 7 deletions

View File

@ -92,7 +92,7 @@ class HNWithCommentsLink(BasicNewsRecipe):
return u'<html><title>' + title + u'</title><body>' + body + '</body></html>' return u'<html><title>' + title + u'</title><body>' + body + '</body></html>'
def parse_feeds(self): def parse_feeds(self):
a = super(HNWithCommentsLinkAlt, self).parse_feeds() a = super().parse_feeds()
self.hn_articles = a[0].articles self.hn_articles = a[0].articles
return a return a
@ -114,11 +114,6 @@ class HNWithCommentsLink(BasicNewsRecipe):
else: else:
content = self.get_readable_content(url) content = self.get_readable_content(url)
article = 0
for a in self.hn_articles:
if a.url == url:
article = a
# content = re.sub(r'</body>\s*</html>\s*$', '', content) + \ # content = re.sub(r'</body>\s*</html>\s*$', '', content) + \
# article.summary + '</body></html>' # article.summary + '</body></html>'

View File

@ -1,5 +1,6 @@
#!/usr/bin/env python #!/usr/bin/env python
from datetime import datetime, timedelta from datetime import datetime, timedelta
from calibre.utils.date import parse_date from calibre.utils.date import parse_date
from calibre.web.feeds.news import BasicNewsRecipe, classes from calibre.web.feeds.news import BasicNewsRecipe, classes

View File

@ -2,6 +2,7 @@
# vim:fileencoding=utf-8 # vim:fileencoding=utf-8
from calibre.web.feeds.news import BasicNewsRecipe from calibre.web.feeds.news import BasicNewsRecipe
class SalzburgerNachrichten(BasicNewsRecipe): class SalzburgerNachrichten(BasicNewsRecipe):
title = 'Salzburger Nachrichten' title = 'Salzburger Nachrichten'
__author__ = 'İlker Melik Sıtkı' __author__ = 'İlker Melik Sıtkı'
@ -56,4 +57,4 @@ class SalzburgerNachrichten(BasicNewsRecipe):
('Briefe an die SN', 'https://www.sn.at/leserforum/xml/rss'), ('Briefe an die SN', 'https://www.sn.at/leserforum/xml/rss'),
('Veranstaltungen', 'https://www.sn.at/veranstaltungen/xml/rss'), ('Veranstaltungen', 'https://www.sn.at/veranstaltungen/xml/rss'),
('Klimawandel', 'https://www.sn.at/panorama/klimawandel/xml/rss') ('Klimawandel', 'https://www.sn.at/panorama/klimawandel/xml/rss')
] ]