summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominic DiTaranto <domdit@gmail.com>2024-08-12 21:31:50 -0400
committerDominic DiTaranto <domdit@gmail.com>2024-08-12 21:31:50 -0400
commited32c0b9d1b3a6ac1ba2a84fe8cb9ad4dfe2e9b3 (patch)
tree2af5755ae29369c536e3602a186f6a6810bcdf01
init commit
-rw-r--r--main.py20
-rw-r--r--requirements.txt8
2 files changed, 28 insertions, 0 deletions
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