Here's the code I have in place right now.
cursor.execute("SELECT link FROM feeds_feed WHERE link=%s",
(self.link,))
db.commit()
if cursor.rowcount == 0:
cursor.execute("INSERT INTO feeds_feed (release_group,
title, link, category, pub_date) VALUES (%s, %s,
I create a new Python file with the following using Wing IDE.
import feedparser
d = feedparser.parse("http://feedparser.org/docs/examples/atom10.xml";)
print d.feed.title
I get this error when I debug.
AssertionError:
Traceback (innermost last):
File "c:\Documents and Settings\abc\Application
I just spent hours trying to figure out why even after I set my SQL
table attributes to UTF-8 only garbage kept adding into the database.
Apparently you need to execute "SET NAMES 'utf8'" before inserting into
the tables.
Does anyone have experience working with other languages using Django
or Tur
I'm trying to replace the ' and " characters in the strings I get from
feedparser so I can enter it in the database without getting errors.
Here's what I have right now.
self.title = entry.title.encode('utf-8')
self.title = self.title.replace('\"', '\\\"')
self.title = self.title.replace('\'', '\\
I'm using PyGreSQL on a PostgreSQL db.
I didn't even include my SQL but Serge guessed right and that's what I
had. I changed it and it works now.
Thanks for the help! :)
--
http://mail.python.org/mailman/listinfo/python-list
Hi guys,
I'm a student/hobbyist programmer interested in creating a web project.
It's nothing too complicated, I would like to get data from an RSS
feed and store that into a database. I want my website to get the
information from the database and display parts of it depending on the
criteria I
Thanks guys. I picked up the Apress book on Python and downloaded the
Komodo IDE trial to get me started.
I'm going to try using Django to build my website and since my brother
already has hosting I'll just borrow some space.
He does PHP for a living, so it would probably be better for me to use