~foxtrotgps-team/foxtrotgps/trunk

« back to all changes in this revision

Viewing changes to contrib/georss2foxtrotgps-poi

  • Committer: Paul Wise
  • Date: 2017-12-20 04:14:40 UTC
  • Revision ID: pabs3@bonedaddy.net-20171220041440-5vwoyaxwm2gqd6j5
Add support for GeoRSS feeds with no descriptions for their items

Just set an empty description for the POIs.

Show diffs side-by-side

added added

removed removed

Lines of Context:
75
75
                rand1 = random.randint(100000000,1000000000)
76
76
                rand2 = random.randint(100000000,1000000000)
77
77
                rand = '%s%s' % (rand1,rand2)
78
 
                desc = e.description
 
78
                desc = e.get('description', '')
79
79
                soup = BeautifulSoup(desc,convertEntities=BeautifulStoneSoup.HTML_ENTITIES,smartQuotesTo=None)
80
80
                [img.extract() for img in soup.findAll('img')]
81
81
                [br.replaceWith('\n') for br in soup.findAll('br')]