import requests
from bs4 import BeautifulSoup
 
url1 = "https://www.zzlian.com/33.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)

 

相关文章:

  • 2022-01-18
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-09
  • 2021-09-25
  • 2022-12-23
  • 2021-10-16
猜你喜欢
  • 2021-09-19
  • 2022-12-23
  • 2022-12-23
  • 2021-09-09
  • 2018-10-23
  • 2022-12-23
相关资源
相似解决方案