|
@@ -2,7 +2,7 @@
|
|
|
"""
|
|
|
Created on 2023-08-11
|
|
|
---------
|
|
|
-@summary: 中国招标投标公共服务平台-列表页(付费代理)
|
|
|
+@summary: 中国招标投标公共服务平台-列表页(付费代理停用)
|
|
|
---------
|
|
|
@author: dzr
|
|
|
"""
|
|
@@ -11,6 +11,7 @@ from collections import namedtuple
|
|
|
import feapder
|
|
|
import feapder.utils.tools as tools
|
|
|
from feapder import Item
|
|
|
+from feapder.network.proxy_pool import swordfish_proxy
|
|
|
from feapder.network.request import requests
|
|
|
from feapder.utils.log import log as logger
|
|
|
from feapder.utils.tools import json
|
|
@@ -30,7 +31,7 @@ class ListPageSpider(feapder.AirSpider):
|
|
|
|
|
|
@property
|
|
|
def proxy(self):
|
|
|
- return pay_proxy()
|
|
|
+ return swordfish_proxy()
|
|
|
|
|
|
@staticmethod
|
|
|
def extract_address(region):
|
|
@@ -63,8 +64,6 @@ class ListPageSpider(feapder.AirSpider):
|
|
|
]
|
|
|
start_time = '2天'
|
|
|
page_size = 1000
|
|
|
- # today = datetime.date.today()
|
|
|
- # end_day = today - datetime.timedelta(days=-3)
|
|
|
for menu in task_menus:
|
|
|
business_type = menu.type
|
|
|
for page in range(1, 2):
|
|
@@ -77,12 +76,18 @@ class ListPageSpider(feapder.AirSpider):
|
|
|
'searchTimeStart': '',
|
|
|
'searchTimeStop': '',
|
|
|
'timeTypeParam': '',
|
|
|
- 'bulletinIssnTime': start_time,
|
|
|
+ 'bulletinIssnTime': '',
|
|
|
'bulletinIssnTimeStart': '',
|
|
|
'bulletinIssnTimeStop': '',
|
|
|
'pageNo': page,
|
|
|
'row': page_size,
|
|
|
}
|
|
|
+
|
|
|
+ if business_type in ['开标记录', '评标公示', '中标公告']:
|
|
|
+ data['timeTypeParam'] = start_time
|
|
|
+ else:
|
|
|
+ data['bulletinIssnTime'] = start_time
|
|
|
+
|
|
|
meta = {
|
|
|
'msg': f'{business_type}-第{page}页',
|
|
|
'interval': 1, # 切换代理间隔时长
|