Hello i am working on a project that prints extracted url to a text file....
I want a little help in my python program it's not working to write all the extracted url to the file whereas this writes the last url only to the file ......
def do_this():
print url
text_file = open("Output.txt", "w")
text_file.write("Extracted URL : %s" % url)
while True:
url, n = getURL(page)
page = page[n:]
if url:
do_this()
else:
text_file.close()
break
I can't find the solution !!
Sorry For Bad English.. Please Help !!