I have these codes for making a search on the site and getting the result.
But i need to add some specifications to this
1-getting the words from a text file or from a database (already made)
2-After getting result fetching a part of the result page.
3-Writing to an xml file or txt or html file what ever even into data base.
. But first how we can write the result as a separate txt or html file?
But i need to add some specifications to this
1-getting the words from a text file or from a database (already made)
2-After getting result fetching a part of the result page.
3-Writing to an xml file or txt or html file what ever even into data base.
. But first how we can write the result as a separate txt or html file?
Code:
# #!/usr/bin/python
# # -*- coding: windows-1254; -*-
#
# import urllib
# dictionary = {} # wow, it's actually a dictionary
# words = ['apple', 'banana', 'cheese']
# for word in words:
# dictionary[word] = urllib.urlopen("http://www.example.com/look.php?w=" + word).read()
#
# print dictionary