Skip to content

Commit

Permalink
small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dgtlmoon committed May 21, 2024
1 parent 1cc0589 commit 7aad136
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion changedetectionio/content_fetchers/puppeteer.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ async def fetch_page(self,
# This user agent is similar to what was used when tweaking the evasions in inject_evasions_into_page(..)
user_agent = None
if request_headers:
user_agent = next((value for key, value in request_headers.items() if key.lower().strip() == 'user-agent'))
user_agent = next((value for key, value in request_headers.items() if key.lower().strip() == 'user-agent'), None)
if user_agent:
await self.page.setUserAgent(user_agent)
# Remove it so it's not sent again with headers after
Expand Down

0 comments on commit 7aad136

Please sign in to comment.