RSS bralnik v pythonu

master
Jurij Podgoršek 2021-09-23 23:19:16 +02:00
parent 7eb18f71d5
commit 7504f95186
4 changed files with 24 additions and 1 deletions

2
mobili_cli/utils/authenticate.py 100644 → 100755
View File

@ -2,7 +2,7 @@
import sys
import json
import sgqlc.endpoint.http import HTTPEndpoint
from sgqlc.endpoint.http import HTTPEndpoint
mutation = """

View File

@ -0,0 +1,16 @@
#!/usr/bin/env python3
import sys
import feedparser
try:
url = sys.argv[1]
f = feedparser.parse(url)
for dogodek in f['entries']:
print(dogodek)
except ValueError:
raise SystemExit('Usage: load-rss-feed.py <url of rss feed>')

View File

@ -0,0 +1,5 @@
#!/bin/bash
url="https://www.neodvisni.art/novice/feed"
../mobili_cli/utils/load-rss-feed.py $url

2
requirements.txt 100644
View File

@ -0,0 +1,2 @@
sgqlc==v14.1
feedparser==6.0.8