Fetching the result

Joined
Sep 26, 2006
Messages
1
Reaction score
0
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?


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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top