Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -5,11 +5,19 @@ import json
|
|
5 |
|
6 |
|
7 |
|
8 |
-
def get_rss(
|
9 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
lod = json.loads(r.text)
|
11 |
return lod
|
12 |
-
|
13 |
with gr.Blocks() as app:
|
14 |
with gr.Row():
|
15 |
inp = gr.Textbox()
|
|
|
5 |
|
6 |
|
7 |
|
8 |
+
def get_rss(rss_url):
|
9 |
+
|
10 |
+
r = requests.get(f'{rss_url}')
|
11 |
+
'''
|
12 |
+
if ".json" in rss_url:
|
13 |
+
lod = json.loads(r.text)
|
14 |
+
if ".xml" in rss_url:
|
15 |
+
with open("xml_file.xml") as xml_file:
|
16 |
+
data_dict = xmltodict.parse(xml_file.read())
|
17 |
+
return lod
|
18 |
+
'''
|
19 |
lod = json.loads(r.text)
|
20 |
return lod
|
|
|
21 |
with gr.Blocks() as app:
|
22 |
with gr.Row():
|
23 |
inp = gr.Textbox()
|