Home > other >  Python climb clove doctor this outbreak map problem
Python climb clove doctor this outbreak map problem

Time:10-01

 import pymysql 
The from LXML import HTML
Import urllib. Request, urllib. Error
The import SSL
The import OS
The import time

CTX=SSL. Create_default_context ()
CTX. Check_hostname=False
CTX. Verify_mode=SSL. CERT_NONE
Html1=urllib. Request. Urlopen (" https://3g.dxy.cn/newh5/view/pneumonia_peopleapp ", the context=CTX). The read ()
Etree=HTML. Etree
Shi=html1. Decode (" utf-8 ")
Etree_html=etree. HTML (shi)
The content=etree_html. Xpath ('//* [@ id="root"]/div/div [3]/div [4]/div [1] ')
Print (content)
For each in the content:
Print (each)

Can climb out data before but now couldn't climb out, but the web elsewhere in addition to this framework can climb, climb out of print is the result of the [], before is [' 3 ']

CodePudding user response:

I know, download the source code does not have the corresponding source code, took the lilac garden this wave of operation
  • Related