Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -359,7 +359,7 @@ def find_rss():
|
|
359 |
#print(lod['rss']['channel']['item'][0].keys())
|
360 |
#print(lod['rss'].keys())
|
361 |
print("##############")
|
362 |
-
print(lod.keys())
|
363 |
print("##############")
|
364 |
|
365 |
for i,ea in enumerate(lod['rss']['channel']['item']):
|
@@ -373,16 +373,16 @@ def find_rss():
|
|
373 |
tt_phrases=tt.noun_phrases
|
374 |
if ea.get('description') != None:
|
375 |
r_description = ea['description']
|
376 |
-
else: r_description =
|
377 |
td = TextBlob(r_description)
|
378 |
td_nouns=td.tags
|
379 |
td_phrases=td.noun_phrases
|
380 |
nouns=tt_nouns+td_nouns
|
381 |
phrases=tt_phrases+td_phrases
|
382 |
lods = {"title":r_title, "description":r_description,"link":r_link, "nouns":nouns, "noun_phrases":phrases}
|
383 |
-
except Exception:
|
384 |
print(f"Exception::{ea}")
|
385 |
-
error_box.append({"Name":rss_url,"Error":e,"Error Code":4})
|
386 |
print(e)
|
387 |
pass
|
388 |
#lods = {"title":"ERROR", "description":{e},"link":"ERROR"}
|
|
|
359 |
#print(lod['rss']['channel']['item'][0].keys())
|
360 |
#print(lod['rss'].keys())
|
361 |
print("##############")
|
362 |
+
print(lod['rss'].keys())
|
363 |
print("##############")
|
364 |
|
365 |
for i,ea in enumerate(lod['rss']['channel']['item']):
|
|
|
373 |
tt_phrases=tt.noun_phrases
|
374 |
if ea.get('description') != None:
|
375 |
r_description = ea['description']
|
376 |
+
else: r_description = lod['rss'].keys()
|
377 |
td = TextBlob(r_description)
|
378 |
td_nouns=td.tags
|
379 |
td_phrases=td.noun_phrases
|
380 |
nouns=tt_nouns+td_nouns
|
381 |
phrases=tt_phrases+td_phrases
|
382 |
lods = {"title":r_title, "description":r_description,"link":r_link, "nouns":nouns, "noun_phrases":phrases}
|
383 |
+
except Exception as e:
|
384 |
print(f"Exception::{ea}")
|
385 |
+
error_box.append({"Name":rss_url,"Keys":lod['rss'].keys(),"Error":e,"Error Code":4})
|
386 |
print(e)
|
387 |
pass
|
388 |
#lods = {"title":"ERROR", "description":{e},"link":"ERROR"}
|