Hey all,

I am basically a QA tester. To ease some process, i need to download 2 files from some server and calculate the time taken to download each file.
1. The file names are constant
2. The location from where i want to download these files is constant

Can someone please assist me on writing a script for doing this? I have no knowledge on programming.
Thanks in advance.

Recommended Answers

All 3 Replies

Can someone help me please?

This is not really training/programming service for free. Those exist separately, including mine.

Here however simple code for what you requested replace with appropriate URLs:

import time
import urllib2
files = ['http://www.daniweb.com/forums/attachment.php?attachmentid=16112&d=1280133590',
         'http://ysisoft.com/daniwebforum_anagrams.txt']
for download in files:
    t0=time.time()
    print('\nDownload: %s\nsize: %i bytes, time: %s s' %
          (download, len(urllib2.urlopen(download).read()), time.time()-t0))

What a mechanized code tonyjv my man. ha ha ha :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.