From 3e4261dddc01b73e6f04c389bfb3996d47704468 Mon Sep 17 00:00:00 2001 From: garret Date: Tue, 9 Jul 2024 16:52:05 +0100 Subject: set a proper user agent --- kadomatsu-rss.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'kadomatsu-rss.py') diff --git a/kadomatsu-rss.py b/kadomatsu-rss.py index 83594c8..85f2176 100755 --- a/kadomatsu-rss.py +++ b/kadomatsu-rss.py @@ -25,6 +25,8 @@ feed = feedgenerator.Rss201rev2Feed( s = requests.Session() +s.headers.update({'User-Agent': 'kadomatsu-rss https://427738.xyz/kadomatsu-rss.html'}) + def get_soup(url): site = s.get(url) site.encoding = "utf-8" -- cgit v1.2.3-70-g09d2