今天在pip安裝BeautifulSoup4的時候,出現了"Could not find a version that satisfies the requirement beauifulSoup4 (from versions: ) No matching distribution found for beauifulSoup4"
原因:BeautifulSoup4已經集成到了bs4
使用的時候變成: import bs4
soup =bs4.BeautifulSoup(html_cont,'html.parser',from_encoding='utf-8')
原因:BeautifulSoup4已經集成到了bs4
使用的時候變成: import bs4
soup =bs4.BeautifulSoup(html_cont,'html.parser',from_encoding='utf-8')
2020-02-05
?直接輸出craw faild,可能哪里有問題啊 我用的pycharm編譯的。然后用其他人19年十月份成功的代碼直接復制粘貼還是craw faild
2020-01-12
python3
說實話,一大堆錯誤,一大堆未定義變量跟無法導入的變量(urlli3,getcode,Rquest,urlopen,cookielib,build_opener,install_opener,urlopen),更可恨的是,utf-8指定了依然報錯,搞毛喔
說實話,一大堆錯誤,一大堆未定義變量跟無法導入的變量(urlli3,getcode,Rquest,urlopen,cookielib,build_opener,install_opener,urlopen),更可恨的是,utf-8指定了依然報錯,搞毛喔
2019-11-12
老師教的是python2,比如print漢字報錯呀 python3確把urllib-urllib2合并了 需要urllib.request
response = urllib.request.urlopen(url)
print中文不報錯我是直接file--sttings--project interpreter --python2.7-換成了3.5 如果沒有快捷路徑可以自己在終端中python3 會看到路徑
#coding=utf-8這個方法我也使用過依舊報錯 不知道神碼原因無所謂了python2我可不想用。
response = urllib.request.urlopen(url)
print中文不報錯我是直接file--sttings--project interpreter --python2.7-換成了3.5 如果沒有快捷路徑可以自己在終端中python3 會看到路徑
#coding=utf-8這個方法我也使用過依舊報錯 不知道神碼原因無所謂了python2我可不想用。
2019-10-26