[問題] 抓網頁UserWarning
import requests
res = requests.get('http://money.cnn.com/2017/03/10/news/economy/february-j
obs-report/index.html')
from bs4 import BeautifulSoup
soup = BeautifulSoup(res)
print(soup.text)
---------------------
我在jupyter執行會出現
http://i.imgur.com/UIWbbPP.jpg

---------------------
我是照著實例做,網址改掉而已。
我只知道應該要印出沒有tag的 內容
不懂問題在哪 我試著改這行 soup= BeautifulSoup((res), "html.parser")
改完後出現 http://i.imgur.com/Fptoc3L.jpg

但我看不懂
-------
另外html.parser是什麼?
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 211.72.106.139
※ 文章網址: https://www.ptt.cc/bbs/Python/M.1489182057.A.4AB.html
推
03/11 06:32, , 1F
03/11 06:32, 1F
→
03/11 06:32, , 2F
03/11 06:32, 2F
→
03/11 06:33, , 3F
03/11 06:33, 3F
→
03/11 06:34, , 4F
03/11 06:34, 4F
→
03/11 06:34, , 5F
03/11 06:34, 5F
→
03/11 06:35, , 6F
03/11 06:35, 6F
→
03/11 16:23, , 7F
03/11 16:23, 7F
→
03/11 16:24, , 8F
03/11 16:24, 8F
→
03/11 22:23, , 9F
03/11 22:23, 9F
推
03/12 22:54, , 10F
03/12 22:54, 10F
Python 近期熱門文章
PTT數位生活區 即時熱門文章