python - 关于使用beatifulsoup4解析html卡死的问题
阿神
阿神 2017-04-18 10:33:24
0
0
582

本地环境,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')

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

阿神
阿神

闭关修行中......

répondre à tous(0)
Derniers téléchargements
Plus>
effets Web
Code source du site Web
Matériel du site Web
Modèle frontal
À propos de nous Clause de non-responsabilité Sitemap
Site Web PHP chinois:Formation PHP en ligne sur le bien-être public,Aidez les apprenants PHP à grandir rapidement!