import requestsfrom bs4 import BeautifulSoupurl = 'https://www.universitego.com/bilgisayar-muhendisligi-2021-taban-puanlari-ve-basari-siralamalari/'soup = BeautifulSoup(requests.get(url).content.decode('utf-8', 'ignore'), 'html.parser')for span in soup.select('tr > td:nth-child(1)'): print(span.get_text(strip=True, separator=' ')) print('-' * 80)我使用上面的代碼從以下網(wǎng)站獲取有關(guān)該部門的部門和表格。然而,我運(yùn)行后得到了一個(gè)空列表。我應(yīng)該怎么辦?謝謝。網(wǎng)站 https://www.universitego.com/4-yillik-bolumlerin-2015-2016-taban-puanlari-ve-basari-siralamalari/ https://www.universitego.com/bilgisayar-muhendisligi-2021-taban-puanlari -ve-basari-siralamalari/
在 python 中通過(guò)網(wǎng)絡(luò)抓取獲取表
開(kāi)心每一天1111
2023-08-08 18:05:21