Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -374,16 +374,20 @@ def find_rss():
|
|
374 |
tt_phrases=tt.noun_phrases
|
375 |
if ea.get('description') != None:
|
376 |
r_description = ea['description']
|
377 |
-
else: r_description = lod['rss'].keys()
|
378 |
td = TextBlob(r_description)
|
379 |
td_nouns=td.tags
|
380 |
-
td_phrases=td.noun_phrases
|
|
|
381 |
nouns=tt_nouns+td_nouns
|
382 |
-
|
|
|
|
|
|
|
383 |
lods = {"title":r_title, "description":r_description,"link":r_link, "nouns":nouns, "noun_phrases":phrases}
|
384 |
except Exception as e:
|
385 |
print(f"Exception::{ea}")
|
386 |
-
error_box.append({"Name":rss_url,"Keys":lod['rss'].keys(),"Error":e,"Error Code":4})
|
387 |
print(e)
|
388 |
pass
|
389 |
#lods = {"title":"ERROR", "description":{e},"link":"ERROR"}
|
|
|
374 |
tt_phrases=tt.noun_phrases
|
375 |
if ea.get('description') != None:
|
376 |
r_description = ea['description']
|
377 |
+
else: r_description = [lod['rss']['channel']['item'].keys()]
|
378 |
td = TextBlob(r_description)
|
379 |
td_nouns=td.tags
|
380 |
+
td_phrases=td.noun_phrases
|
381 |
+
|
382 |
nouns=tt_nouns+td_nouns
|
383 |
+
tdd_phrases=[x for x in td.noun_phrases if x[1]=='NN' else pass]
|
384 |
+
|
385 |
+
ttt_phrases=[x for x in tt.noun_phrases if x[1]=='NN' else pass]
|
386 |
+
phrases=ttt_phrases+tdd_phrases
|
387 |
lods = {"title":r_title, "description":r_description,"link":r_link, "nouns":nouns, "noun_phrases":phrases}
|
388 |
except Exception as e:
|
389 |
print(f"Exception::{ea}")
|
390 |
+
error_box.append({"Name":rss_url,"Keys":lod['rss']['channel'].keys(),"Error":e,"Error Code":4})
|
391 |
print(e)
|
392 |
pass
|
393 |
#lods = {"title":"ERROR", "description":{e},"link":"ERROR"}
|