-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Expand file tree
/
Copy pathdaili66.py
More file actions
42 lines (33 loc) · 1.08 KB
/
Copy pathdaili66.py
File metadata and controls
42 lines (33 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# -*- coding: utf-8 -*-
"""
-------------------------------------------------
File Name: daili66.py
Description : 66代理
Author : JHao
date: 2026/06/08
-------------------------------------------------
Change Activity:
2026/06/08:
-------------------------------------------------
"""
__author__ = 'JHao'
from fetcher.baseFetcher import BaseFetcher
from handler.logHandler import LogHandler
from util.webRequest import WebRequest
logger = LogHandler("fetcher")
class DaiLi66Fetcher(BaseFetcher):
"""66代理 https://www.66daili.com"""
name = "daili66"
url = "https://www.66daili.com"
enabled = True
def fetch(self):
url = "http://api.66daili.com/?format=json"
r = WebRequest().get(url, timeout=10)
try:
for each in r.json.get("data", []):
yield "%s:%s" % (each["ip"], each["port"])
except Exception as e:
logger.error("ProxyFetch - daili66: %s" % e)
if __name__ == '__main__':
for proxy in DaiLi66Fetcher().fetch():
print(proxy)