简体   繁体   English

如何在python中获取URL的控制台输出?

[英]How to get Console Output of URL in python?

I searched for a solution to my problem but couldnt find any. 我正在寻找解决问题的方法,但找不到任何解决方法。

Is there a way to open a URL in python and get the console output from that url? 有没有办法在python中打开URL并从该URL获取控制台输出?

Im trying to check a list of URLs for Javascript errors. 我正在尝试检查URL列表中是否存在Javascript错误。 The only solution I found was using Selenium but its incredible slow. 我发现的唯一解决方案是使用Selenium,但是它的速度令人难以置信。

From first look the Chrome solution seems easier. 乍看起来,Chrome解决方案似乎更容易。

  • Last but not least I stumbled over the python module selenium which can do liveserver testing. 最后但并非最不重要的一点是,我偶然发现了可以进行liveserver测试的python模块selenium

For reference see this django use case , there is also an other post how to catch js errors 作为参考,请参阅此django用例 ,还有另一篇文章如何捕获js错误

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM