0

I want to send many requests to a string field of a proxy site. I write this script:

import pycurl

i = 0
c = pycurl.Curl()
c.setopt(c.URL, 'http://proxysite/index.php?q=test')
while True:
    c.perform()
    i += 1
    print ('Num of REQ = ', i)

But I think this is a slow method and its speed is approximately 1 req/sec. Is there a faster method than this in python? (My connection speed is good)

Richard
  • 69
  • 2
  • 10
  • What are you trying to do ? A DoS ? – bruno desthuilliers Feb 11 '17 at 15:09
  • No, with my resources I cannot do this, I just want to know a better method. – Richard Feb 11 '17 at 15:19
  • I never used pycurl (usually I use python-requests) but I'd be surprised if pycurl was the culprit - chances are most of your time is spent in the request/response cycle itself. You could either profile the code or try python-requests or the stdlib's urllib instead but I doubt it'll get any faster. And you still not answered my question : what are you trying to do ? – bruno desthuilliers Feb 11 '17 at 15:34

0 Answers0