Skip to content

Commit

Permalink
fetchers: spysone, hidemyname updated
Browse files Browse the repository at this point in the history
  • Loading branch information
vgavro committed Dec 25, 2023
1 parent 801e913 commit d5176ab
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions proxytools/fetchers/hidemyname.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class HidemyNameProxyFetcher(ConcreteProxyFetcher):
# NOTE: looks like working ok only from UA ip?
URL = 'https://hidemyna.me/en/proxy-list/'
URL = 'https://hidemy.io/en/proxy-list/'

ANONYMITY_MAP = {
'High': Proxy.ANONYMITY.HIGH,
Expand Down Expand Up @@ -44,11 +44,11 @@ def page_worker(self, start):
return self.parse_proxies(html.fromstring(resp.text))

def parse_pages_count(self, doc):
ul = doc.cssselect('div.proxy__pagination ul')[0]
return int(ul[-1][0].text)
ul = doc.cssselect('.services_proxylist .pagination ul')[0]
return int(ul[-1][0].text or ul[-2][0].text)

def parse_proxies(self, doc):
tbody = doc.cssselect('table.proxy__t tbody')[0]
tbody = doc.cssselect('.services_proxylist .table_block tbody')[0]
for tr in tbody:
types = [Proxy.TYPE[t.strip()] for t in tr[4].text.upper().split(',')]
assert types
Expand Down
6 changes: 3 additions & 3 deletions proxytools/fetchers/spysone.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@


class SpysOneProxyFetcher(ConcreteProxyFetcher):
COUNTRIES_URL = 'http://spys.one/en/proxy-by-country/'
COUNTRY_URL = 'http://spys.one/free-proxy-list/{}/'
COUNTRIES_URL = 'https://spys.one/en/proxy-by-country/'
COUNTRY_URL = 'https://spys.one/free-proxy-list/{}/'

JS_CONTEXT_REGEXP = re.compile('<script type="text/javascript">'
'(eval\(function\(p\,r\,o\,x\,y\,s\).*?)'
Expand Down Expand Up @@ -66,7 +66,7 @@ def _resp_parser(self, resp, country):
assert counter, 'No proxies found for {}'.format(country)

def _row_parser(self, tr, country, js_context):
addr_elem = tr[0][1]
addr_elem = tr[0][0]
assert addr_elem.tag == 'font'
assert addr_elem[0].tag == 'script'
ip = addr_elem.text
Expand Down

0 comments on commit d5176ab

Please sign in to comment.