提交 9e1c5656 作者: 薛凌堃

REITs政策法规

上级 b3fa91e8
...@@ -16,7 +16,7 @@ policy = Policy() ...@@ -16,7 +16,7 @@ policy = Policy()
topic = 'research_center_fourth' topic = 'research_center_fourth'
webname = '北京市人民政府_' webname = '北京市人民政府'
class Policy1(): class Policy1():
@retry(tries=3, delay=10) @retry(tries=3, delay=10)
......
...@@ -14,7 +14,7 @@ policy = Policy() ...@@ -14,7 +14,7 @@ policy = Policy()
topic = 'research_center_fourth' topic = 'research_center_fourth'
webname = '重庆市人民政府_' webname = '重庆市人民政府'
headers = { headers = {
'Content-Type': 'application/json', 'Content-Type': 'application/json',
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36 Edg/119.0.0.0', 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36 Edg/119.0.0.0',
......
...@@ -14,7 +14,7 @@ log = baseCore.getLogger() ...@@ -14,7 +14,7 @@ log = baseCore.getLogger()
from reits import Policy from reits import Policy
policy = Policy() policy = Policy()
topic = 'research_center_fourth' topic = 'research_center_fourth'
webname = '福建省人民政府_' webname = '福建省人民政府'
headers = { headers = {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36 Edg/119.0.0.0', 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36 Edg/119.0.0.0',
'X-Requested-With': 'XMLHttpRequest', 'X-Requested-With': 'XMLHttpRequest',
......
...@@ -20,7 +20,7 @@ policy = Policy() ...@@ -20,7 +20,7 @@ policy = Policy()
topic = 'research_center_fourth' topic = 'research_center_fourth'
webname = '广东省人民政府_' webname = '广东省人民政府'
headers = { headers = {
'Content-Type': 'application/json', 'Content-Type': 'application/json',
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36', 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36',
......
...@@ -16,7 +16,7 @@ from reits import Policy ...@@ -16,7 +16,7 @@ from reits import Policy
policy = Policy() policy = Policy()
topic = 'research_center_fourth' topic = 'research_center_fourth'
webname = '广西壮族自治区人民政府_' webname = '广西壮族自治区人民政府'
headers = { headers = {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36 Edg/119.0.0.0', 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36 Edg/119.0.0.0',
'Content-Type': 'application/json', 'Content-Type': 'application/json',
......
...@@ -18,7 +18,7 @@ policy = Policy() ...@@ -18,7 +18,7 @@ policy = Policy()
topic = 'research_center_fourth' topic = 'research_center_fourth'
webname = '海南省人民政府_' webname = '海南省人民政府'
headers = { headers = {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36 Edg/119.0.0.0', 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36 Edg/119.0.0.0',
......
...@@ -14,7 +14,7 @@ from reits import Policy ...@@ -14,7 +14,7 @@ from reits import Policy
policy = Policy() policy = Policy()
topic = 'research_center_fourth' topic = 'research_center_fourth'
webname = '黑龙江省人民政府_' webname = '黑龙江省人民政府'
headers = { headers = {
'Content-Type': 'application/x-www-form-urlencoded', 'Content-Type': 'application/x-www-form-urlencoded',
'Token': 'b946cd4e-77a4-42f5-bcaf-a9c4f26b5191', 'Token': 'b946cd4e-77a4-42f5-bcaf-a9c4f26b5191',
......
...@@ -22,7 +22,7 @@ policy = Policy() ...@@ -22,7 +22,7 @@ policy = Policy()
topic = 'research_center_fourth' topic = 'research_center_fourth'
webname = '湖北省人民政府_' webname = '湖北省人民政府'
headers = { headers = {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36 Edg/119.0.0.0', 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36 Edg/119.0.0.0',
} }
......
...@@ -18,7 +18,7 @@ policy = Policy() ...@@ -18,7 +18,7 @@ policy = Policy()
topic = 'research_center_fourth' topic = 'research_center_fourth'
webname = '江苏省人民政府_' webname = '江苏省人民政府'
headers = { headers = {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36 Edg/119.0.0.0', 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36 Edg/119.0.0.0',
......
...@@ -16,7 +16,7 @@ policy = Policy() ...@@ -16,7 +16,7 @@ policy = Policy()
topic = 'research_center_fourth' topic = 'research_center_fourth'
webname = '江西省人民政府_' webname = '江西省人民政府'
headers = { headers = {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36 Edg/119.0.0.0', 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36 Edg/119.0.0.0',
'X-Requested-With': 'XMLHttpRequest', 'X-Requested-With': 'XMLHttpRequest',
......
...@@ -15,7 +15,7 @@ policy = Policy() ...@@ -15,7 +15,7 @@ policy = Policy()
topic = 'research_center_fourth' topic = 'research_center_fourth'
webname = '吉林市人民政府_' webname = '吉林市人民政府'
headers = { headers = {
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8', 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36 Edg/119.0.0.0', 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36 Edg/119.0.0.0',
......
...@@ -16,7 +16,7 @@ policy = Policy() ...@@ -16,7 +16,7 @@ policy = Policy()
topic = 'research_center_fourth' topic = 'research_center_fourth'
webname = '辽宁省人民政府_' webname = '辽宁省人民政府'
headers = { headers = {
'User_Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36 Edg/119.0.0.0' 'User_Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36 Edg/119.0.0.0'
} }
......
...@@ -16,7 +16,7 @@ policy = Policy() ...@@ -16,7 +16,7 @@ policy = Policy()
topic = 'research_center_fourth' topic = 'research_center_fourth'
webname = '内蒙古自治区人民政府_' webname = '内蒙古自治区人民政府'
headers = { headers = {
'Accept': 'application/json, text/plain, */*', 'Accept': 'application/json, text/plain, */*',
'Accept-Encoding': 'gzip, deflate, br', 'Accept-Encoding': 'gzip, deflate, br',
......
...@@ -12,7 +12,7 @@ from reits import Policy ...@@ -12,7 +12,7 @@ from reits import Policy
policy = Policy() policy = Policy()
topic = 'research_center_fourth' topic = 'research_center_fourth'
webname = '山东省人民政府_' webname = '山东省人民政府'
headers = { headers = {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36 Edg/119.0.0.0', 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36 Edg/119.0.0.0',
'X-Requested-With': 'XMLHttpRequest', 'X-Requested-With': 'XMLHttpRequest',
......
...@@ -18,7 +18,7 @@ policy = Policy() ...@@ -18,7 +18,7 @@ policy = Policy()
topic = 'research_center_fourth' topic = 'research_center_fourth'
webname = '上海市人民政府_' webname = '上海市人民政府'
headers = { headers = {
'Accept': '*/*', 'Accept': '*/*',
'Accept-Encoding': 'gzip, deflate, br', 'Accept-Encoding': 'gzip, deflate, br',
......
...@@ -15,7 +15,7 @@ policy = Policy() ...@@ -15,7 +15,7 @@ policy = Policy()
topic = 'research_center_fourth' topic = 'research_center_fourth'
webname = '山西省人民政府_' webname = '山西省人民政府'
headers = { headers = {
'Accept': 'application/json, text/plain, */*', 'Accept': 'application/json, text/plain, */*',
'Accept-Encoding': 'gzip, deflate', 'Accept-Encoding': 'gzip, deflate',
......
...@@ -15,7 +15,7 @@ from reits import Policy ...@@ -15,7 +15,7 @@ from reits import Policy
policy = Policy() policy = Policy()
topic = 'research_center_fourth' topic = 'research_center_fourth'
webname = '四川省人民政府_' webname = '四川省人民政府'
headers = { headers = {
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8', 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36 Edg/119.0.0.0', 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36 Edg/119.0.0.0',
......
...@@ -17,7 +17,7 @@ policy = Policy() ...@@ -17,7 +17,7 @@ policy = Policy()
topic = 'research_center_fourth' topic = 'research_center_fourth'
webname = '天津市人民政府_' webname = '天津市人民政府'
import urllib3 import urllib3
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
......
...@@ -20,7 +20,7 @@ policy = Policy() ...@@ -20,7 +20,7 @@ policy = Policy()
topic = 'research_center_fourth' topic = 'research_center_fourth'
webname = '云南省人民政府_' webname = '云南省人民政府'
headers = { headers = {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36 Edg/119.0.0.0', 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36 Edg/119.0.0.0',
} }
...@@ -149,17 +149,14 @@ def getData(div, num): ...@@ -149,17 +149,14 @@ def getData(div, num):
content, contentWithTag, id_list = getContent(href, publishDate, num) content, contentWithTag, id_list = getContent(href, publishDate, num)
contentWithTag_str = str(contentWithTag) contentWithTag_str = str(contentWithTag)
time_now = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()) time_now = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
lang = baseCore.detect_language(content)
dic_info = { dic_info = {
'attachmentIds': id_list, 'attachmentIds': id_list,
'subjectId': '1729315113088765953',
'lang': lang,
'author': '', 'author': '',
'content': content, 'content': content,
'contentWithTag': contentWithTag_str, 'contentWithTag': contentWithTag_str,
'deleteFlag': 0, 'deleteFlag': 0,
'checkStatus': 1, 'checkStatus': 1,
'id': '1729315113088765953'+str(int(time.time())), 'id': '',
'title': title, 'title': title,
'publishDate': publishDate, 'publishDate': publishDate,
'origin': origin, 'origin': origin,
......
...@@ -17,7 +17,7 @@ headers = { ...@@ -17,7 +17,7 @@ headers = {
} }
topic = 'research_center_fourth' topic = 'research_center_fourth'
webname = '浙江省人民政府_' webname = '浙江省人民政府'
class Policy(): class Policy():
def getrequest_soup(self, headers, url): def getrequest_soup(self, headers, url):
......
...@@ -19,7 +19,7 @@ import BaseCore ...@@ -19,7 +19,7 @@ import BaseCore
baseCore = BaseCore.BaseCore() baseCore = BaseCore.BaseCore()
log = baseCore.getLogger() log = baseCore.getLogger()
filepath = "data/" filepath = "data/"
topic = 'policy' topic = 'research_center_fourth'
class Policy(): class Policy():
def getrequest_soup(self,headers,url): def getrequest_soup(self,headers,url):
req = requests.get(headers=headers,url=url) req = requests.get(headers=headers,url=url)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论