Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update WaPo #2375

Merged
merged 3 commits into from
Aug 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions recipes/wash_post.recipe
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class TheWashingtonPost(BasicNewsRecipe):
no_stylesheets = True
encoding = 'utf8'
use_embedded_content = False
language = 'en'
language = 'en_US'
remove_empty_feeds = True
ignore_duplicate_articles = {'url'}
masthead_url = 'https://www.washingtonpost.com/pb/resources/img/twp-masthead-415x57.svg'
Expand Down Expand Up @@ -51,7 +51,7 @@ class TheWashingtonPost(BasicNewsRecipe):
'''

def get_browser(self):
return BasicNewsRecipe.get_browser(self, verify_ssl_certificates=False, user_agent='common_words/based')
return BasicNewsRecipe.get_browser(self, verify_ssl_certificates=False, user_agent='Mozilla/5.0 (Windows NT 10.0; rv:128.0) Gecko/20100101 Firefox/128.0')

# Official feeds: https://www.washingtonpost.com/discussions/2018/10/12/washington-post-rss-feeds/
feeds = [
Expand Down
6 changes: 4 additions & 2 deletions recipes/wash_post_print.recipe
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/usr/bin/env python
# vim:fileencoding=utf-8
'''
washingtonpost.com
'''
Expand All @@ -22,7 +24,7 @@ class wapoprint(BasicNewsRecipe):
no_stylesheets = True
use_embedded_content = False
encoding = 'utf-8'
language = 'en'
language = 'en_US'
remove_attributes = ['style', 'height', 'width']
publication_type = 'newspaper'
ignore_duplicate_articles = {'title', 'url'}
Expand All @@ -34,7 +36,7 @@ class wapoprint(BasicNewsRecipe):
'''

def get_browser(self):
return BasicNewsRecipe.get_browser(self, user_agent='common_words/based')
return BasicNewsRecipe.get_browser(self, verify_ssl_certificates=False, user_agent='Mozilla/5.0 (Windows NT 10.0; rv:128.0) Gecko/20100101 Firefox/128.0')

def parse_index(self):
soup = self.index_to_soup('https://www.washingtonpost.com/todays_paper/updates/')
Expand Down
Loading