From 60169f977860c6c253ebf67e0bc288864cceaf05 Mon Sep 17 00:00:00 2001 From: garret Date: Sun, 2 Oct 2022 01:57:28 +0100 Subject: use a requests session --- kadomatsu-rss.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'kadomatsu-rss.py') diff --git a/kadomatsu-rss.py b/kadomatsu-rss.py index 29398d9..8a31c14 100755 --- a/kadomatsu-rss.py +++ b/kadomatsu-rss.py @@ -29,9 +29,10 @@ class Item: self.url = url self.content = content +s = requests.Session() def get_soup(url): - site = requests.get(url) + site = s.get(url) site.encoding = "utf-8" soup = BeautifulSoup(site.text, "lxml") return soup -- cgit v1.2.3-70-g09d2