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