Omnibus commited on
Commit
9028aaa
·
verified ·
1 Parent(s): 81f5876

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -8
app.py CHANGED
@@ -324,7 +324,6 @@ def find_rss():
324
  #lod=""
325
  #print (ea['link'])
326
  if ea.get('link') is not None:
327
-
328
  rss_url=ea['link']
329
  else:
330
  rss_url=ea['URL']
@@ -369,15 +368,15 @@ def find_rss():
369
  if ea.get('title') != None:
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 = 'No Description'
378
- td = TextBlob(r_description)
379
- td_nouns=td.tags
380
- td_phrases=td.noun_phrases
381
  nouns=tt_nouns+td_nouns
382
  phrases=tt_phrases+td_phrases
383
  lods = {"title":r_title, "description":r_description,"link":r_link, "nouns":nouns, "noun_phrases":phrases}
 
324
  #lod=""
325
  #print (ea['link'])
326
  if ea.get('link') is not None:
 
327
  rss_url=ea['link']
328
  else:
329
  rss_url=ea['URL']
 
368
  if ea.get('title') != None:
369
  r_title = ea['title']
370
  else: r_title= ea['source']
371
+ tt = TextBlob(r_title)
372
+ tt_nouns=tt.tags
373
+ tt_phrases=tt.noun_phrases
374
  if ea.get('description') != None:
375
  r_description = ea['description']
376
+ else: r_description = ea.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}