import requests from bs4 import BeautifulSoup url1 = "https://mip.keoaeic.org/journal_skills/6616.html" html = requests.get(url1).content html=html.decode('utf-8') # python3 soup = BeautifulSoup(html, "html.parser") a = soup.select('script[type="application/ld+json"]') #查找<script[type="application/ld+json"]> 里面的內容,因為這個地址上面有多個相同的,只需要獲取對應的下標內容即可。 t = list(a)[0].text print(r)