Skip to content

Empty proxy list #74

@d3banjan

Description

@d3banjan

Proof https://replit.com/@d3banjan/KhakiStarchyCustomer#main.py

The following code fails ---

from random import choice
from http_request_randomizer.requests.proxy.requestProxy import RequestProxy

proxies = RequestProxy().get_proxy_list()

PROXY = choice(proxies).get_address()

print(PROXY, type(PROXY))

... with the following error message --

2021-08-18 10:14:57,091 http_request_randomizer.requests.useragent.userAgent INFO     Using local file for user agents: /opt/virtualenvs/python3/lib/python3.8/site-packages/http_request_randomizer/requests/proxy/../data/user_agents.txt
2021-08-18 10:14:57,093 root   DEBUG    === Initialized Proxy Parsers ===
2021-08-18 10:14:57,093 root   DEBUG         FreeProxy parser of 'http://free-proxy-list.net' with required bandwidth: '150' KBs
2021-08-18 10:14:57,093 root   DEBUG         PremProxy parser of 'https://premproxy.com/list/' with required bandwidth: '150' KBs
2021-08-18 10:14:57,093 root   DEBUG         SslProxy parser of 'https://www.sslproxies.org' with required bandwidth: '150' KBs
2021-08-18 10:14:57,093 root   DEBUG    =================================
2021-08-18 10:14:57,525 http_request_randomizer.requests.parsers.FreeProxyParser ERROR    Provider FreeProxy failed with Attribute error: 'NoneType' object has no attribute 'find'
2021-08-18 10:14:57,526 root   DEBUG    Added 0 proxies from FreeProxy
2021-08-18 10:14:58,051 http_request_randomizer.requests.parsers.PremProxyParser WARNING  Proxy Provider url failed: https://premproxy.com/list/
2021-08-18 10:14:58,051 http_request_randomizer.requests.parsers.PremProxyParser DEBUG    Pages: set()
2021-08-18 10:14:58,465 http_request_randomizer.requests.parsers.PremProxyParser WARNING  Proxy Provider url failed: https://premproxy.com/list/
2021-08-18 10:14:58,466 root   DEBUG    Added 0 proxies from PremProxy
2021-08-18 10:14:58,792 http_request_randomizer.requests.parsers.SslProxyParser ERROR    Provider SslProxy failed with Attribute error: 'NoneType' object has no attribute 'find'
2021-08-18 10:14:58,792 root   DEBUG    Added 0 proxies from SslProxy
2021-08-18 10:14:58,792 root   DEBUG    Total proxies = 0
2021-08-18 10:14:58,792 root   DEBUG    Filtered proxies = 0
Traceback (most recent call last):
  File "main.py", line 4, in <module>
    proxies = RequestProxy().get_proxy_list()
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/http_request_randomizer/requests/proxy/requestProxy.py", line 69, in __init__
    self.current_proxy = self.randomize_proxy()
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/http_request_randomizer/requests/proxy/requestProxy.py", line 86, in randomize_proxy
    raise ProxyListException("list is empty")
http_request_randomizer.requests.errors.ProxyListException.ProxyListException: list is empty

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions