Maison  >  Questions et réponses  >  le corps du texte

python - 关于使用beatifulsoup4解析html卡死的问题

本地环境,mac os ,python3.4, beatifulsoup4.4
服务器环境,ubuntu14.4, python3.4 ,beatifulsoup4.4
代码段:
抓取源url: http://chart.cp.360.cn/kaijia...

contents_string = bytes.decode(contents, 'GBK')
soup = bs4.BeautifulSoup(contents, 'lxml', from_encoding='GBK')

这段代码在我本地的正常的,没有任何问题,但是发布到线上,在执行这段代码的的时候
程序会无限的卡死,也不会报任何错误,执行不了下一句代码!!!我已经找不到任何原因了,有了解这个情况或者能告诉我该如何去检测的麻烦告知,谢谢

阿神阿神2741 Il y a quelques jours584

répondre à tous(0)je répondrai

Pas de réponse
  • Annulerrépondre