当前位置:网站首页>04 extract the latest data
04 extract the latest data
2022-07-21 15:18:00 【Yinma Hanhai】
# 1. Import related modules
import requests
from bs4 import BeautifulSoup
# 2. Send a request , Get the first page of the epidemic
response = requests.get('https://ncov.dxy.cn/ncovh5/view/pneumonia')
home_page = response.content.decode()
# print(home_page) # You can enter it at the console Ctrl+F You can search ( Be careful : Because there is no comment on this , So the content printed on the console is repeated . Just annotate )
# 3. Use BeautifulSoup Extract the data
soup = BeautifulSoup(home_page, 'lxml')
script = soup.find(id="getListByCountryTypeService2true")
print(script) # It's straight here script Just go , You can print out all the contents
边栏推荐
- LoRa基站覆盖范围
- DAMA-第八章(数据集成与互操作)
- How many bytes do double, float and long occupy?
- 从去IOE到CIPU,中国云计算要走出自己的路径
- 第二章第九节:练习答案
- Section 8 of Chapter II: addition, deletion, modification and query of the list
- Rasterization comprehensive analysis
- 虚拟机双网卡配置
- 金融场景下,分布式数据库如何精准选型和快速落地?
- Detailed explanation of TCP communication process (with case code)
猜你喜欢
金融企业出海新兴市场机遇与挑战并存,ADVANCE.AI保障其安全合规发展
DAMA-第四章(数据架构)
(2022 version) zero foundation entry network security /web security, collecting this article is enough
【C 练习】求一个数最少需要多少步可变为斐波那契数
Section 12 of Chapter 2: set set
Section 10 of Chapter 2: supplementary knowledge points of the list
Mysql的主键UUID、自增ID、雪花算法到底该怎么选择?(荣耀典藏版)
架构实战营模块 7 作业
Winform窗体使用Assembly实例化及传参
面试中常见的的 web 安全问题
随机推荐
【二叉树】分裂二叉树的最大乘积
DAMA-第十一章(数据仓库与商务智能)
金融场景下,分布式数据库如何精准选型和快速落地?
Section 5 of Chapter 2: search and judgment
Section 7 of Chapter 2: the concept of list
Section 8 of Chapter II: addition, deletion, modification and query of the list
Vulnhub靶机-doubletrouble
[public class preview]: cloud video conference system privatization practice
xshell 判断文件超出指定大小则清空文件
北大同宿舍三人毕业后分别去外企、国企、创业,10年后都后悔什么
C#调用存储过程传输表值参数
Indoor positioning of mobile robot and application of Internet of things based on visible light communication
Web3 traffic aggregation platform starfish OS gives players a new paradigm experience of metauniverse
Automatic invoice processing - get rid of the shackles of paper and data input, automate workflow and exception handling, and significantly shorten the audit preparation time
银行数据管理办法
Section 15 of Chapter 2: basic operation of dictionary
Section 6 of Chapter 2: supplement and summary of strings
第二章第六节:字符串的补充和总结
Devaxpress xtrareport report development related knowledge points
NFS共享存储服务