提交 9e1c5656 作者: 薛凌堃

REITs政策法规

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