[問題] 小菜雞爬匯率詢問
各位大神
小弟我最近想要爬各國匯率簡化工作流程
但真的太菜了想問一點小問題
import requests
from bs4 import BeautifulSoup
req=request.get('https://invest.cnyes.com/forex/detail/USDTWD/history')
html=req.content.decode('utf8')
soup=BeautifulSoup(html,'lxml')
for td in Soup.findAll('td'):
text=td.text.strip
print(text)
看網站原始碼是有對道數字,但實際爬出來就只有--
我html真的菜QQ,想詢問原因,拜託各位大大了
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 220.141.174.116 (臺灣)
※ 文章網址: https://www.ptt.cc/bbs/Python/M.1682174118.A.7AA.html
→
04/22 23:37,
2年前
, 1F
04/22 23:37, 1F
→
04/23 17:25,
2年前
, 2F
04/23 17:25, 2F
→
04/23 17:37,
2年前
, 3F
04/23 17:37, 3F
Python 近期熱門文章
PTT數位生活區 即時熱門文章