Re: NameError: name 'beautifulsoup' is not define

看板Marginalman作者 (夏洛克。福爾摩斯)時間7年前 (2018/12/17 14:26), 編輯推噓2(204)
留言6則, 5人參與, 7年前最新討論串2/2 (看更多)
※ 引述《oz5566 (夏洛克。福爾摩斯)》之銘言: : --------------------------------------------------------------------------- : NameError Traceback (most recent call last) : <ipython-input-2-2d9df5aef3d8> in <module>() : ----> 1 soup = beautifulsoup(html_paser) : 2 header = soup.select ('h1') : 3 print(header) : NameError: name 'beautifulsoup' is not defined : 奇怪咧 : 我上網看是說 沒有 : from bs4 import BeautifulSoup : 但我有阿 : 為啥有問題 → walter741225: 你不覺得你的美麗湯長的不太樣嗎 我剛剛發現ㄌ== 然後驗在世 soup = BeautifulSoup(html_sample, 'html.paser') header = soup.select('h1') print(header) 錯誤變這樣== --------------------------------------------------------------------------- FeatureNotFound Traceback (most recent call last) <ipython-input-9-a2dfee4a21c9> in <module>() ----> 1 soup = BeautifulSoup(html_sample, 'html.paser') 2 header = soup.select('h1') 3 print(header) D:\Anaconda3\lib\site-packages\bs4\__init__.py in __init__(self, markup, features, builder, parse_only, from_encoding, exclude_encodings, **kwargs) 196 "Couldn't find a tree builder with the features you " 197 "requested: %s. Do you need to install a parser library?" --> 198 % ",".join(features)) 199 builder = builder_class() 200 if not (original_features == builder.NAME or FeatureNotFound: Couldn't find a tree builder with the features you requested: html.paser. Do you need to install a parser library? 好長 三小 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 39.8.13.109 ※ 文章網址: https://www.ptt.cc/bbs/Marginalman/M.1545028019.A.10A.html

12/17 14:28, 7年前 , 1F
html.parser≠html.paser ==
12/17 14:28, 1F

12/17 14:28, 7年前 , 2F
嗚嗚嗚嗚嗚 終於出來ㄌ 我要哭了
12/17 14:28, 2F

12/17 14:29, 7年前 , 3F
馬的 你是不是要重學英文
12/17 14:29, 3F

12/17 14:30, 7年前 , 4F
這失誤我卡ㄌ一葛禮拜==
12/17 14:30, 4F

12/17 14:40, 7年前 , 5F
你大一計概老師人一定很好
12/17 14:40, 5F

12/17 15:50, 7年前 , 6F
這一串蠻好笑的 值得做成簽名檔
12/17 15:50, 6F
文章代碼(AID): #1S5q6p4A (Marginalman)
文章代碼(AID): #1S5q6p4A (Marginalman)