Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -11,9 +11,12 @@ def find_rss(rss_url):
|
|
11 |
r = requests.get(f'{rss_url}')
|
12 |
soup = bs4.BeautifulSoup(r.content,'lxml')
|
13 |
for i,p in enumerate(soup.find_all("a")):
|
14 |
-
|
15 |
-
|
16 |
-
|
|
|
|
|
|
|
17 |
json_box.append(json_dict)
|
18 |
return json_box
|
19 |
|
|
|
11 |
r = requests.get(f'{rss_url}')
|
12 |
soup = bs4.BeautifulSoup(r.content,'lxml')
|
13 |
for i,p in enumerate(soup.find_all("a")):
|
14 |
+
try:
|
15 |
+
if ".xml" in p['href'] or ".json" in p['href'] or ".rss" in p['href']:
|
16 |
+
print (p['href'])
|
17 |
+
json_dict[p.text]=p['href']
|
18 |
+
except Exception:
|
19 |
+
pass
|
20 |
json_box.append(json_dict)
|
21 |
return json_box
|
22 |
|