看板 Python 關於我們 聯絡資訊
小的在進行dcard爬蟲之後 要進行將超連結去除的處理 那以下是我的程式碼 附上原始文本 那結果感覺是亂碼!? 跪求 還有什麼辦法能解決呢? 感激不盡 http://i.imgur.com/g9s1MYS.jpg -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 27.246.13.220 ※ 文章網址: https://www.ptt.cc/bbs/Python/M.1479627427.A.582.html
s860134: 編碼 11/20 15:49
s860134: 取得資料後確定它編碼是甚麼,看 idle 應該是decode錯了 11/20 16:31
dinoptt1993: http://i.imgur.com/OWyrDL6.jpg 11/20 23:53
dinoptt1993: 我另外寫了code但是這次可以成功將結果打印在shell上 11/20 23:54
dinoptt1993: 但是卻無法寫入檔案... 11/20 23:54
dinoptt1993: 結果好了 但是花了點時間!ㄡㄡ 11/21 00:36
enjoyloli: 要不要參考這篇 https://goo.gl/WRlRW0 講 unicode 的 11/21 12:54
uranusjr: 上面這篇是上個月寫的竟然用八年前發行的 Python 2.5 我 11/21 13:34
uranusjr: 也是很佩服 11/21 13:35
s860134: 你幹嘛這樣xd 11/21 19:59