lundi 20 avril 2015

Python [u'string'] psycopg2.ProgrammingError: [on hold]

I'm using Goose extractor to parse some news articles. however for some articles ie (http://ift.tt/1JlUiNP) I get an error referring to the author, as it is stored as [u'Forename Surname'], this produces a psycopg2.ProgrammingError: when I try to load it into a postgreSQL db. All other information seems to load just fine.

I've tried using author = str(article.author) and author.encode("utf-8") however I still get the same error.

How can I convert this field to a normal text string?

Aucun commentaire:

Enregistrer un commentaire