This commit is contained in:
Kovid Goyal 2023-10-19 20:20:54 +05:30
parent 7c0f34f6ed
commit 743a9690bb
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 5 additions and 4 deletions

View File

@ -1,4 +1,4 @@
from calibre.web.feeds.news import BasicNewsRecipe, classes from calibre.web.feeds.news import BasicNewsRecipe
class newslaundry(BasicNewsRecipe): class newslaundry(BasicNewsRecipe):
title = 'Newslaundry' title = 'Newslaundry'
@ -32,5 +32,6 @@ class newslaundry(BasicNewsRecipe):
# return soup # return soup
def print_version(self, url): def print_version(self, url):
if 'hindi.newslaundry' in url: self.abort_article('Skipping hindi article') # remove this line if you want hindi articles. if 'hindi.newslaundry' in url:
self.abort_article('Skipping hindi article') # remove this line if you want hindi articles.
return url return url

View File

@ -1,4 +1,4 @@
from calibre.web.feeds.news import BasicNewsRecipe, classes from calibre.web.feeds.news import BasicNewsRecipe
from calibre.scraper.simple import read_url from calibre.scraper.simple import read_url
from calibre.ptempfile import PersistentTemporaryFile from calibre.ptempfile import PersistentTemporaryFile
@ -41,7 +41,7 @@ class projectsynd(BasicNewsRecipe):
dict(attrs={'itemprop':lambda x: x and 'associatedMedia' in x.split()}), dict(attrs={'itemprop':lambda x: x and 'associatedMedia' in x.split()}),
dict(attrs={'itemprop':['headline', 'datePublished', 'author', 'abstract', 'articleBody']}), dict(attrs={'itemprop':['headline', 'datePublished', 'author', 'abstract', 'articleBody']}),
] ]
remove_tags = [ remove_tags = [
dict(name=['button', 'svg']), dict(name=['button', 'svg']),
dict(attrs={'data-message-area':True}), dict(attrs={'data-message-area':True}),