К
Size: a a a
RG
RG
RG
RG
iz
# -*- coding: utf-8 -*-
import re
import json
PROXY = []
regex = re.compile("(\d+\.\d+\.\d+\.\d+:\d+)")
with open('proxies.txt') as f:
for line in f:
try:
result = regex.search(line)
if result:
PROXY.append(result.group(1))
except:
pass
with open('proxy.json', 'w+') as f:
f.write(json.dumps({'HTTPS_PROXIES': list(set(PROXY))}))
RG
# -*- coding: utf-8 -*-
import re
import json
PROXY = []
regex = re.compile("(\d+\.\d+\.\d+\.\d+:\d+)")
with open('proxies.txt') as f:
for line in f:
try:
result = regex.search(line)
if result:
PROXY.append(result.group(1))
except:
pass
with open('proxy.json', 'w+') as f:
f.write(json.dumps({'HTTPS_PROXIES': list(set(PROXY))}))
iz
RG
iz
RG
🎅B
Traceback (most recent call last):
File "D:\anaconda\lib\site-packages\twisted\internet\defer.py", line 654, in _runCallbacks
current.result = callback(current.result, *args, **kw)
File "D:\anaconda\lib\site-packages\scrapy\spiders\__init__.py", line 90, in parse
raise NotImplementedError('{}.parse callback is not defined'.format(self.__class__.__name__))
NotImplementedError: NflSpider.parse callback is not defined
СТ