Update derStandaard

This commit is contained in:
Kovid Goyal 2019-08-18 13:03:45 +05:30
parent 7460a12a4b
commit 9808bf69c9
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -61,6 +61,7 @@ class DerStandardRecipe(BasicNewsRecipe):
def get_browser(self):
br = BasicNewsRecipe.get_browser(self)
br.set_simple_cookie('DSGVO_Check', '', '.derstandard.at')
headers = {
'X-Requested-With': 'XMLHttpRequest',
'Content-Type': 'application/json; charset=UTF-8',
@ -69,12 +70,12 @@ class DerStandardRecipe(BasicNewsRecipe):
'Cache-Control': 'no-cache'
}
import mechanize
req = mechanize.Request(url='https://derstandard.at/privacyprotection/api/agree', data=None, headers=headers, method='POST')
req = mechanize.Request(url='https://apps.derstandard.at/privacyprotection/api/agree', data=None, headers=headers, method='POST')
br.open(req)
return br
keep_only_tags = [
classes('artikel'),
classes('article-header article-body article-origins article-subtitle article-pubdate'),
]
remove_tags = [