Closed vnjk closed 7 years ago
nevermind, figured out the problem. cheers
@vnjk I fixed an issure in the setup.py file and now the easiest way would be to create a new project and import the pypi library (using requirements.txt for example) http-request-randomizer==0.0.5 After create a python file and test the code below:
import time
from http.requests.proxy.requestProxy import RequestProxy
if __name__ == '__main__':
print "Hello"
start = time.time()
req_proxy = RequestProxy()
print "Initialization took: {0} sec".format((time.time() - start))
print "Size : ", len(req_proxy.get_proxy_list())
print " ALL = ", req_proxy.get_proxy_list()
test_url = 'http://icanhazip.com'
while True:
start = time.time()
request = req_proxy.generate_proxied_request(test_url)
print "Proxied Request Took: {0} sec => Status: {1}".format((time.time() - start), request.__str__())
if request is not None:
print "\t Response: ip={0}".format(request.text)
print "Proxy List Size: ", len(req_proxy.get_proxy_list())
print"-> Going to sleep.."
time.sleep(10)
Thanks for reporting and sorry for the delay!
Hi, as above: I have tried importing RequestProxy but with no success.
Following the style of:
The error returned is:
How can I import the library correctly? Please advise. Thank you