From ed32c0b9d1b3a6ac1ba2a84fe8cb9ad4dfe2e9b3 Mon Sep 17 00:00:00 2001 From: Dominic DiTaranto Date: Mon, 12 Aug 2024 21:31:50 -0400 Subject: init commit --- main.py | 20 ++++++++++++++++++++ requirements.txt | 8 ++++++++ 2 files changed, 28 insertions(+) create mode 100644 main.py create mode 100644 requirements.txt diff --git a/main.py b/main.py new file mode 100644 index 0000000..73b8bb0 --- /dev/null +++ b/main.py @@ -0,0 +1,20 @@ +from bs4 import BeautifulSoup +import requests +import argparse +import lxml + + +if __name__ == '__main__': + parser = argparse.ArgumentParser() + parser.add_argument('rss_url') + args = parser.parse_args() + + rss_url = args.rss_url + + resp = requests.get(rss_url) + rss_feed = resp.content + + soup = BeautifulSoup(rss_feed, 'xml') + for item in soup.find_all('item'): + for guid in item.find_all('guid'): + print(guid.text) diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..b8620c3 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,8 @@ +beautifulsoup4==4.12.3 +certifi==2024.7.4 +charset-normalizer==3.3.2 +idna==3.7 +lxml==5.3.0 +requests==2.32.3 +soupsieve==2.5 +urllib3==2.2.2 -- cgit v1.2.3-70-g09d2