Trouble writing to database: RSS-reader

Arne arne.k.h at gmail.com
Mon Jan 21 11:12:43 EST 2008


Hi!

I try to make a rss-reader in python just for fun, and I'm almost
finished. I don't have any syntax-errors, but when i run my program,
nothing happends.

This program is supposed to download a .xml-file, save the contents in
a buffer-file(buffer.txt) and parse the file looking for start-tags.
When it has found a start tag, it asumes that the content (between the
start-tag and the end-tag) is on the same line, so then it removes the
start-tag and the end-tag and saves the content and put it into a
database.

The problem is that i cant find the data in the database! If i watch
my program while im running it, i can see that it sucsessfuly
downloads the .xml-file from the web and saves it in the buffer.

But I dont think that i save the data in the correct way, so it would
be nice if someone had some time to help me.

Full code: http://pastebin.com/m56487698
Saving to database: http://pastebin.com/m7ec69e1b
Retrieving from database: http://pastebin.com/m714c3ef8

And yes, I know that there is rss-parseres already built, but this is
only for learning.



More information about the Python-list mailing list