|
@@ -11,19 +11,18 @@ import time
|
|
|
from enum import Enum
|
|
|
|
|
|
import execjs
|
|
|
-from tqdm import tqdm
|
|
|
-
|
|
|
import feapder
|
|
|
import feapder.utils.tools as tools
|
|
|
-from cookie_pool import WebCookiePool
|
|
|
-from encode_info import encode_info
|
|
|
from feapder import Item
|
|
|
from feapder.db.mongodb import MongoDB
|
|
|
-from feapder.network.proxy_pool import swordfish_proxy
|
|
|
from feapder.network.request import requests
|
|
|
from feapder.network.response import Response
|
|
|
from feapder.utils.cleaner import cleaner
|
|
|
from feapder.utils.log import log
|
|
|
+from tqdm import tqdm
|
|
|
+
|
|
|
+from cookie_pool import WebCookiePool
|
|
|
+from encode_info import encode_info
|
|
|
|
|
|
# 兆字节,单位:M
|
|
|
MEGABYTES = 1024 * 1024 # 1M
|
|
@@ -48,6 +47,17 @@ def get_acw_sc_v2(param):
|
|
|
return result
|
|
|
|
|
|
|
|
|
+def pay_proxy():
|
|
|
+ url = 'http://tiqu.pyhttp.taolop.com/getflowip?count=1&neek=80160&type=1&sep=1&sb=&ip_si=1&mr=0'
|
|
|
+ response = requests.get(url)
|
|
|
+ proxy = response.content.decode().strip()
|
|
|
+ proxies = {
|
|
|
+ 'http': 'socks5://{}'.format(proxy),
|
|
|
+ 'https': 'socks5://{}'.format(proxy)
|
|
|
+ }
|
|
|
+ return proxies
|
|
|
+
|
|
|
+
|
|
|
class DataStreamReadStatus(Enum):
|
|
|
"""数据流读取状态"""
|
|
|
NORMAL = 2 # 数据正常接收
|
|
@@ -78,7 +88,7 @@ class DetailSpider(feapder.AirSpider):
|
|
|
|
|
|
@property
|
|
|
def proxy(self):
|
|
|
- return swordfish_proxy()
|
|
|
+ return pay_proxy()
|
|
|
|
|
|
def get_response(self, request, response):
|
|
|
"""
|