python script to obtain the contents of

Requests Import 
from the BeautifulSoup BS4 Import 

URL1 = "https://mip.keoaeic.org/journal_skills/6616.html" 
HTML = requests.get (URL1) .content 
HTML html.decode = ( 'UTF-. 8') to python3 # 
Soup the BeautifulSoup = (HTML, "html.parser") 
a = soup.select ( 'Script [type = "file application / JSON LD +"]') 
# Find <script [type = "application / ld + json"]> inside content, since a plurality of the same address above, only corresponding to the acquired index the content. 

List = T (A) [0] .text 
Print (R & lt)

  

Guess you like

Origin www.cnblogs.com/todarcy/p/12502838.html