diff options
author | garret <garret@airmail.cc> | 2024-07-09 16:52:05 +0100 |
---|---|---|
committer | garret <garret@airmail.cc> | 2024-07-09 16:52:05 +0100 |
commit | 3e4261dddc01b73e6f04c389bfb3996d47704468 (patch) | |
tree | 7277bac681bf8ebbb8fb64bf16e982658003f5ba /kadomatsu-rss.py | |
parent | 60135aed6fdd587c8c175ca79edb224d14cf9595 (diff) | |
download | kadomatsu-rss-3e4261dddc01b73e6f04c389bfb3996d47704468.tar.gz kadomatsu-rss-3e4261dddc01b73e6f04c389bfb3996d47704468.tar.bz2 kadomatsu-rss-3e4261dddc01b73e6f04c389bfb3996d47704468.zip |
set a proper user agent
Diffstat (limited to 'kadomatsu-rss.py')
-rwxr-xr-x | kadomatsu-rss.py | 2 |
1 files changed, 2 insertions, 0 deletions
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" |