Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mancheng
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
mancheng
Commits
6bc2f3f7
Commit
6bc2f3f7
authored
Apr 17, 2023
by
dong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix20230417
parent
03f36573
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
6 deletions
+23
-6
apps/models.py
+3
-3
apps/view_xiaocx/update_investment_information.py
+20
-3
No files found.
apps/models.py
View file @
6bc2f3f7
...
...
@@ -667,7 +667,7 @@ class Induzone(db.Model):
email
=
db
.
Column
(
db
.
String
(
30
))
# 邮箱
address
=
db
.
Column
(
db
.
String
(
255
),
doc
=
'园区地址'
,
comment
=
'园区地址'
)
# 园区地址
industry_position
=
db
.
Column
(
db
.
String
(
255
),
doc
=
'产业定位'
,
comment
=
'产业定位'
)
# 产业定位
gdp
=
db
.
Column
(
db
.
Float
,
doc
=
'GDP(亿元)'
,
comment
=
'GDP(亿元)'
)
# GDP(亿元)
gdp
=
db
.
Column
(
db
.
String
(
30
)
,
doc
=
'GDP(亿元)'
,
comment
=
'GDP(亿元)'
)
# GDP(亿元)
represent
=
db
.
Column
(
db
.
Text
,
doc
=
'代表企业'
,
comment
=
'代表企业'
)
# 代表企业
introduct
=
db
.
Column
(
db
.
Text
,
doc
=
'园区简介'
,
comment
=
'园区简介'
)
# 园区简介
level
=
db
.
Column
(
db
.
String
(
32
),
doc
=
'园区级别'
,
comment
=
'园区级别'
)
# 园区级别
...
...
@@ -721,9 +721,9 @@ class Induzone(db.Model):
development_zone
=
db
.
Column
(
db
.
String
(
255
),
doc
=
'所在开发区'
,
comment
=
'所在开发区'
)
# 所在开发区
upper_district
=
db
.
Column
(
db
.
String
(
255
),
doc
=
'上级行政区'
,
comment
=
'上级行政区'
)
# 所在开发区
# 辖区面积
xiaqu_area
=
db
.
Column
(
db
.
Float
,
comment
=
'辖区面积(平方公里)'
)
xiaqu_area
=
db
.
Column
(
db
.
String
(
30
)
,
comment
=
'辖区面积(平方公里)'
)
# 人口
people_num
=
db
.
Column
(
db
.
Float
,
comment
=
'人口'
)
people_num
=
db
.
Column
(
db
.
String
(
30
)
,
comment
=
'人口'
)
# 载体形态
carrier_form
=
db
.
Column
(
db
.
String
(
30
),
comment
=
'载体形态'
)
# 建筑面积
...
...
apps/view_xiaocx/update_investment_information.py
View file @
6bc2f3f7
...
...
@@ -118,10 +118,26 @@ def work_trend():
content_html
.
encoding
=
'utf-8'
if
content_html
.
status_code
==
200
:
html_etree1
=
etree
.
HTML
(
content_html
.
text
)
# handeled_html_str = etree.tostring(html_etree1).decode()
# print(handeled_html_str)
if
content_name
==
"《党委(党组)网络安全工作责任制实施办法》解读"
:
handeled_html_str
=
etree
.
tostring
(
html_etree1
)
.
decode
()
print
(
handeled_html_str
)
# content_info_list = html_etree1.xpath(
# '//div[@class="view TRS_UEDITOR trs_paper_default trs_web"]/p/text()')
content_info_list
=
html_etree1
.
xpath
(
'//div[@class="view TRS_UEDITOR trs_paper_default trs_web"]//text()'
)
if
not
content_info_list
:
content_info_list
=
html_etree1
.
xpath
(
'//div[@class="view TRS_UEDITOR trs_paper_default trs_word trs_web"]//text()'
)
if
not
content_info_list
:
content_info_list
=
html_etree1
.
xpath
(
'//div[@class="view TRS_UEDITOR trs_paper_default trs_web"]/p/text()'
)
'//div[@class="view TRS_UEDITOR trs_paper_default"]//@href'
)
if
content_info_list
and
content_info_list
[
0
]
.
startswith
(
'./'
):
content_info_list
=
[
'请复制链接到浏览器查看:'
+
'http://zsj.jcgov.gov.cn/xwdt/zhxx/202301/'
+
content_info_list
[
0
]
.
replace
(
'./'
,
''
)]
if
content_info_list
and
content_info_list
[
0
]
.
startswith
(
'http'
):
content_info_list
=
[
'请复制链接到浏览器查看:'
+
content_info_list
[
0
]]
content_info1
=
''
for
content_info
in
content_info_list
:
content_info1
=
content_info1
+
'<br>'
+
content_info
...
...
@@ -155,3 +171,4 @@ def work_trend():
db
.
session
.
add
(
inform_obj
)
db
.
session
.
commit
()
return
jsonify
(
code
=
RET
.
OK
,
msg
=
"入库成功"
,
data
=
data_list
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment