RSS bralnik v pythonu
parent
7eb18f71d5
commit
7504f95186
|
@ -2,7 +2,7 @@
|
|||
|
||||
import sys
|
||||
import json
|
||||
import sgqlc.endpoint.http import HTTPEndpoint
|
||||
from sgqlc.endpoint.http import HTTPEndpoint
|
||||
|
||||
|
||||
mutation = """
|
||||
|
|
|
@ -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>')
|
||||
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
url="https://www.neodvisni.art/novice/feed"
|
||||
|
||||
../mobili_cli/utils/load-rss-feed.py $url
|
|
@ -0,0 +1,2 @@
|
|||
sgqlc==v14.1
|
||||
feedparser==6.0.8
|
Loading…
Reference in New Issue