簡體   English   中英

使用漂亮的湯刮網站返回“無”

[英]Scraping website using beautiful soup returning “None”

我正在嘗試運行以下代碼,但我一直返回“無”。 我要抓取的網站是 dsd.tools。

URL = 'https://dsd.tools/'
page = requests.get(URL)
soup = BeautifulSoup(page.content, 'html.parser')
title = soup.find("div", {"class": "content"})
print(title)

它應該很簡單,但由於某種原因,我無法返回“TWAP 價格”。 讓我知道你們的想法。

嘗試打印響應文本。

page = requests.get(URL)
print(page.text)

您正在查看的元素似乎沒有響應。 也許內容是在客戶端使用 JS 生成的。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM