pgaref/HTTP_Request_Randomizer

NameError: global name 'test_url' is not defined

asmaier opened this issue · 2 comments

When I do

    >>> import requestProxy
    >>> proxy = requestProxy.RequestProxy()
    >>> proxy.generate_proxied_request("http://www.google.com")

I get the error

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "requestProxy.py", line 64, in generate_proxied_request
    request = requests.get(test_url, proxies={"http": rand_proxy},
NameError: global name 'test_url' is not defined

I believe in line 64 of requestProxy.py it should say "url" instead of "test_url":

https://github.com/pgaref/HTTP_Request_Randomizer/blob/master/project/http/requests/proxy/requestProxy.py#L64

@asmaier you are totally right! test_url is a global variable that's why it was not causing a problem so far. I can see you have a fix already, want to create a pull request?

Thanks!

I created a pull request from my fork.