add code shtjgb&shbjnq&shyq

This commit is contained in:
yiliyassh@163.com
2022-05-22 17:53:23 +08:00
parent 764b00913d
commit fc9772fd33
6 changed files with 200 additions and 9 deletions

View File

@@ -1,5 +1,5 @@
# 官方权威统计数据持续更新2022-5-20
# 官方权威统计数据持续更新2022-5-22
[数据下载 shell & python](./data/data.md)
```markdown
收集整理的【官方权威】公开数据

70
code/shtjgb.py Normal file
View File

@@ -0,0 +1,70 @@
#!/usr/bin/env python
# -*- coding:utf-8 -*-
# Author: yiliyas
# Date: 2022.5.22
import re
from urllib import request
# 1.获取数据
def get_html(url):
# https 模拟浏览器头
headers = {'User-Agent':'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.75 Safari/537.36'}
req = request.Request(url,headers=headers)
response=request.urlopen(req)
# 根据实际地址修改字符集
content=response.read().decode('utf-8')
return content
# 2.处理数据(设置匹配条件)
def get_url(content):
# 根据地址不同,判断设置不同的匹配条件
pattern = re.compile('<li> <p> <a target="_blank" href="(.*?)" title="(.*?)">.*?</a> <span>(.*?)</span> </p> </li>',re.S)
items = re.findall(pattern,content)
return items
# 3.显示数据
def show_result(items):
# 根据地址不同,判断设置不同的匹配条件
for item in items:
curl=item[0]
title=item[1]
cdate=item[2]
# 生成完整的链接地址
strs='|['+title+']('+curl+')|'+cdate
# 显示链接信息
if str(title).find('公报')>-1:
print(strs)
# 下载数据
#get_file(curl)
# 4.下载数据(写入文件)
def get_file(url):
file_name = url.split('/')[-1]
# 修改路径
file_names='E:/download/'+file_name
req = request.Request(url)
u = request.urlopen(req)
f = open(file_names, 'wb')
block_sz = 8192
while True:
buffer = u.read(block_sz)
if not buffer:
break
f.write(buffer)
f.close()
print ("Sucessful to download" + " " + file_name)
# 下载2002~2021
#url = 'http://tjj.sh.gov.cn/tjgb/index.html'
#url = 'http://tjj.sh.gov.cn/tjgb/index_2.html'
url = 'http://tjj.sh.gov.cn/tjgb/index_3.html'
# 获取信息
html = get_html(url)
# 获取下载地址
items = get_url(html)
# 下载显示数据
show_result(items)

67
code/shtjnq.py Normal file
View File

@@ -0,0 +1,67 @@
#!/usr/bin/env python
# -*- coding:utf-8 -*-
# Author: yiliyas
# Date: 2022.5.22
import re
from urllib import request
# 1.获取数据
def get_html(url):
# https 模拟浏览器头
headers = {'User-Agent':'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.75 Safari/537.36'}
req = request.Request(url,headers=headers)
response=request.urlopen(req)
# 根据实际地址修改字符集
content=response.read().decode('utf-8')
return content
# 2.处理数据(设置匹配条件)
def get_url(content):
# 根据地址不同,判断设置不同的匹配条件
pattern = re.compile('<li> <p> <a target="_blank" href="(.*?)" title="(.*?)">(.*?)</a> </p> </li>',re.S)
items = re.findall(pattern,content)
return items
# 3.显示数据
def show_result(items):
# 根据地址不同,判断设置不同的匹配条件
for item in items:
curl=item[0]
title=item[1]
cname=item[2]
# 生成完整的链接地址
strs=cname+'|'+curl
# 显示链接信息
print(strs)
# 下载数据
#get_file(curl)
# 4.下载数据(写入文件)
def get_file(url):
file_name = url.split('/')[-1]
# 修改路径
file_names='E:/download/'+file_name
req = request.Request(url)
u = request.urlopen(req)
f = open(file_names, 'wb')
block_sz = 8192
while True:
buffer = u.read(block_sz)
if not buffer:
break
f.write(buffer)
f.close()
print ("Sucessful to download" + " " + file_name)
# 下载2002~2021
url = 'http://tjj.sh.gov.cn/tjnj/index.html'
# 获取信息
html = get_html(url)
# 获取下载地址
items = get_url(html)
# 下载显示数据
show_result(items)

50
code/shyq.py Normal file
View File

@@ -0,0 +1,50 @@
#!/usr/bin/env python
# -*- coding:utf-8 -*-
# Author: yiliyas
# date: 2022.4.24
from urllib import request
import re
# 上海市商业联合会抗疫保供产销对接信息平台生活物资供应名录json格式数据类别统计
url = 'https://c.kdcer.com/sh_keep_supply/home/categories'
req = request.Request(url)
response=request.urlopen(req)
content=response.read().decode('utf-8-sig')
# 获得类型id,类别,企业名
pattern = re.compile('"name":"(.*?)",.*?,"count":(.*?)}',re.S)
items = re.findall(pattern,content)
m=0
for item in items:
m = m+1
cname=item[0]
cnum=item[1]
# 获得全部企业——总数
if str(cname).find("全部企业")>-1:
nums = int(cnum)
# 输入markdown格式
strs='|'+cname+'|'+str(cnum)
print(strs)
# 打印markdown表头
title2='\n|序号|类型|点击(详细工商信息)|\n'+'|:----|:----|:----|'
print(title2)
n=0
# 获得总页数每页20个
m = int(nums/20)+1
for i in range(1,nums):
url = 'https://c.kdcer.com/sh_keep_supply/home/enterprises?categoryId=-1&keyword=&page='+str(i)+'&limit=20'
req = request.Request(url)
response=request.urlopen(req)
content=response.read().decode('utf-8-sig')
# 获得类型id,类别,企业名
pattern = re.compile('"name":"(.*?)",".*?,"categoryName":"(.*?)"',re.S)
items = re.findall(pattern,content)
for item in items:
n=n+1
cname=item[0]
cgname=item[1]
strs='|'+str(n)+'|'+cgname+'|'+cname
print(strs)

View File

@@ -7,6 +7,10 @@
|名称|发布日期|简介|
|:----|:----|:----|
|[2022年中国云服务行业应用白皮书](https://report.iresearch.cn/report/202205/3997.shtml)|2022/5/20 18:26:40|相对于以往艾瑞常规云服务相关研究报告不同,本报告侧重从供给侧和需求侧两个视角去看待云服务在各个垂直行业的差异化应用。一方面从供给侧来看,研究厂商基于自身行业理解和技术积累为满足不同行业客户需求的所提供的针对性的解决方案,在这一过程中,厂商会不断调整技术策略、产品策略、市场生态策略来适应需求侧的诉求。另一方面从需求侧来看,更加强调云服务在垂直行业的应用形态,包括在基础资源层、平台资源层、应用层上的明显行业属性差异。此外,对于需求侧的属性划分,本报告将聚焦在具备一定共性需求的数字原生行业和非数字原生行业两大类型进行研究。
|[2022年酒精饮料用户洞察报告—低度酒葡萄酒](https://report.iresearch.cn/report/202205/3996.shtml)|2022/5/19 13:55:02|本报告通过消费者调研,聚焦低度酒和葡萄酒品类,分析线上销售格局、消费特征和目标客户未满足的需求空间,。帮助酒饮品牌更好地理解品类发展和人群特征的新变化,从而洞悉未来品类发展机会。
|[2022年中国零售私域数智化增长白皮书](https://report.iresearch.cn/report/202205/3995.shtml)|2022/5/19 12:05:36|《2022年中国零售私域数智化增长白皮书》通过对私域数智化发展背景、私域数智化布局及增长痛点“道”、“场”、“器”、“术”的分析梳理零售私域数智化的布局策略展现“选平台”、“用工具”、“重运营”、“贯渠道”的价值旨在探讨私域数智化的发展趋势以期对市场认知提供一定参考。
|[2022年中国美颜拍摄类APP用户营销价值洞察报告](https://report.iresearch.cn/report/202205/3994.shtml)|2022/5/17 16:04:25|《2022年中国美颜拍摄类APP用户营销价值洞察报告》研究内容包括美颜拍摄类APP的用户画像与拍照美颜场景下的核心利益点挖掘美颜拍摄类APP的广告营销价值为广告主的投放决策提供真实参考。
|[2021年中国互联网CPS营销生态白皮书](https://report.iresearch.cn/report/202205/3993.shtml)|2022/5/13 9:00:00|《2021年中国互联网CPS营销生态白皮书》在对中国CPS营销生态的发展历程和大环境梳理的同时从产业链和核心角色方出发解读当下CPS营销生态的现状。本报告将CPS售卖覆盖的场景划分为导购、社交和内容三个场景供应链在不同场景中的重要性日益凸显。未来供应链将驱动CPS营销生态逐渐趋于品质回归品牌方的营销效果、联盟方的渠道布局、推客方的合作模式以及用户方的消费习惯都将向品质化升级。
|[2022年中国杯壶行业研究报告](https://report.iresearch.cn/report/202205/3992.shtml)|2022/5/12 11:15:52|本报告对中国(密封型)杯壶行业的发展历程、现状和趋势进行梳理研究,并侧重对高端杯壶市场的市场规模、驱动因素以及消费者画像展开了调研,满足了发行人客户在招股书中对于我国杯壶行业数据和信息的引用需求,论证了发行人所在的高端杯壶细分领域发展前景。
|[2021年中国新能源汽车换电市场研究报告](https://report.iresearch.cn/report/202205/3991.shtml)|2022/5/11 15:00:07|目前中国新能源汽车市场正在由以政策为导向逐渐转向以市场为导向的阶段2021年中国新能源汽车市场实现了高速增长但在市场快速发展的同时用户的“充电难”、“充电慢”等问题越加凸显用户需求与充电模式的矛盾不断加深。在此背景下换电市场迎来发展转机多项支持政策出台资本涌入技术不断成熟商业模式逐渐成形多方利好因素推进换电模式发展。本报告将聚焦新能源汽车换电市场希望通过对中国新能源汽车换电市场外围环境社会、经济、政策、技术、发展现状、商业模式、及未来趋势的研究分析帮助各方相关企业、机构充分了解中国新能汽车换电市场的发展态势把握市场商机。

View File

@@ -1,4 +1,4 @@
# 官方权威统计数据更新日期2022-5-20
# 官方权威统计数据更新日期2022-5-22
|数据名称|本地镜像|shell下载|python下载|说明|
|:----|:----|:----|:----|:----|
@@ -11,16 +11,16 @@
|😄[白皮书273 个](http://www.caict.ac.cn/kxyj/qwfb/bps)|[镜像](./data-caict-bps.md)| |[python](../code/caict-bps.py)|权威发布ICT行业白皮书|
|😄[专题报告196 个](http://www.caict.ac.cn/kxyj/qwfb)|[镜像](./data-caict-ztbg.md)| |[python](../code/caict-bg.py)|权威发布ICT行业专题报告|
|😄[权威数据490 个](http://www.caict.ac.cn/kxyj/qwfb/qwsj/)|[镜像](./data-caict-qwsj.md)| |[python](../code/caict-qwsj.py)|权威发布ICT行业权威数据|
|[7.财富FORTUNE 500强](https://www.fortunechina.com/rankings/node_11663.htm)|[镜像](../top/t500.md)|[shell](../code/test.md)|[python](../code/test.py)|世界500强中国500强|
|[7.财富FORTUNE 500强](https://www.fortunechina.com/rankings/node_11663.htm)|[镜像](../top/t500.md)| |[python](../code/test.py)|世界500强中国500强|
|8.上海数据|[镜像](./data-sh.md)| | |统计公报,统计年签,社会民生数据|
|[上海统计公报](http://tjj.sh.gov.cn/tjgb/index.html)|[镜像](./data-sh.md)|[shell](../code/test.md)|[python](../code/test.py)|2002-2021年20年官方权威数据|
|[上海统计年签](http://tjj.sh.gov.cn/tjnj/index.html)|[镜像](./data-sh.md)|[shell](../code/test.md)|[python](../code/test.py)|2004-2021年18年官方权威数据|
|[上海统计公报](http://tjj.sh.gov.cn/tjgb/index.html)|[镜像](./data-sh.md)| |[python](../code/shtjgb.py)|2002-2021年20年官方权威数据|
|[上海统计年签](http://tjj.sh.gov.cn/tjnj/index.html)|[镜像](./data-sh.md)| |[python](../code/shtjnq.py)|2004-2021年18年官方权威数据|
|[上海市卫生健康委员会](https://wsjkw.sh.gov.cn/xwfb/index.html)| | | |疫情数据发布|
|[上海市商务委员会-绿卡通行证企业大全](https://sww.sh.gov.cn/swdt/index.html)|[镜像](./data-sh-yq.md)| |[python](../code/test.py)|疫情保障,商务动态|
|[上海市商务委员会-绿卡通行证企业大全](https://sww.sh.gov.cn/swdt/index.html)|[镜像](./data-sh-yq.md)| |[python](../code/shyq.py)|疫情保障,商务动态|
|[9.艾瑞咨询——产业研究报告](https://www.iresearch.com.cn/report.shtml)| | | |新经济与产业数字化,专业咨询服务领导品牌|
|😄最新报告|[镜像](./data-report.md)|[shell](../code/test.md)|[python](../code/test.py)||
|😄行业分类报告-24个分类|[镜像](./data-report-type.md)|[shell](../code/test.md)|[python](../code/test.py)||
|😄行业年度报告-2012年——2022年|[镜像](./data-report-year.md)| [shell](../code/test.md)|[python](../code/test.py)||
|😄最新报告|[镜像](./data-report.md)| |[python](../code/test.py)||
|😄行业分类报告-24个分类|[镜像](./data-report-type.md)| |[python](../code/test.py)||
|😄行业年度报告-2012年——2022年|[镜像](./data-report-year.md)| |[python](../code/test.py)||
|10. AI公开数据集| | | |^_^最好的在最后^_^|
|[最全中文NLP资源库](https://github.com/fighting41love/funNLP)|😄[镜像](../ai/funnlp.md)| | |五星推荐,用了都说好!!!|
|开放数据集(Open Dataset)|[镜像](../ai/funnlp.md)|[shell](../code/test.md)|[python](../code/test.py)|建设中|