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

Add HTTP headers to the request #115

Merged

Conversation

ogajduse
Copy link
Collaborator

Fixes #112

Some HTTP servers require User-Agent to be present in the request header. This patch adds it to each request that the integration does.

I also found out that elcomercio.es does throws 403 in case User-Agent is not present in the header or if "feedparser" in headers["User-Agent"]. Which is strange. Therefore the User-Agent value contains feed-parser instead of simple feedparser.

@ogajduse ogajduse added the enhancement New feature or request label Dec 12, 2023
@ogajduse ogajduse self-assigned this Dec 12, 2023
@ogajduse ogajduse force-pushed the feat/add-http-headers-to-request branch 2 times, most recently from 9e641d4 to 6dbc55b Compare December 12, 2023 18:13
@ogajduse ogajduse force-pushed the feat/add-http-headers-to-request branch from 6dbc55b to 6bddfc9 Compare December 12, 2023 18:18
@ogajduse ogajduse merged commit c184f03 into custom-components:master Jan 10, 2024
6 checks passed
@ogajduse ogajduse deleted the feat/add-http-headers-to-request branch January 10, 2024 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feed sensor return empty state for valid rss
1 participant