summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgarret <garret@airmail.cc>2024-07-09 16:52:05 +0100
committergarret <garret@airmail.cc>2024-07-09 16:52:05 +0100
commit3e4261dddc01b73e6f04c389bfb3996d47704468 (patch)
tree7277bac681bf8ebbb8fb64bf16e982658003f5ba
parent60135aed6fdd587c8c175ca79edb224d14cf9595 (diff)
downloadkadomatsu-rss-3e4261dddc01b73e6f04c389bfb3996d47704468.tar.gz
kadomatsu-rss-3e4261dddc01b73e6f04c389bfb3996d47704468.tar.bz2
kadomatsu-rss-3e4261dddc01b73e6f04c389bfb3996d47704468.zip
set a proper user agent
-rwxr-xr-xkadomatsu-rss.py2
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"