Inserting HTML files as strings in database

vivek kumar gupt_vive at hotmail.com
Tue Apr 15 07:57:17 EDT 2003


hi all,
  I am trying to make a search engine in python. I want to save the html 
files retrieved by the crawler into a Mysql database as strings 
(MEDIUMTEXT). But the characters like ' " etc are giving problems while 
inserting it as a string. Is there any way to escape these characters ( like 
\' for ') without reading the whole file and checking for these special 
charaters???
  And also as it is the first time i am trying to implement a search engine 
type of thing. I have implemented a basic crawler using urllib2 ( coz of 
proxy ). Can u please help me by giving some pointers??

I am using Python 2.2.2, MySQL 3.23.55, MySQLdb 0.9.2 on windows 2000.

thanks
Vivek Kumar

_________________________________________________________________
Vrroooom…… Fasten your seatbelts. 
http://server1.msn.co.in/msnSpecials/formula2003/index.asp Get set for F1 
2003






More information about the Python-list mailing list