custom-components / feedparser

📰 RSS Feed Integration
MIT License
143 stars 32 forks source link

Add HTTP headers to the request #115

Closed ogajduse closed 9 months ago

ogajduse commented 10 months ago

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.