使用 Python 进行网页抓取
Using Python for web scraping
我需要在我的 python 代码中使用特定网站(将英语翻译成我的语言),而且我不想在 python 中使用 googletrans,它的数据量很大,所以我需要使用 python 来快速完成它,是否有任何参考资料或任何标题超出我的阅读范围?或 python 中的任何文档?
谢谢
您可能想考虑使用 selenium 或 BeautifulSoup 与网站交互或网络抓取,但如果您只想打开网站,则可以使用网络浏览器模块。
import webbrowser
Google = 'https://www.google.com/?safe=active&safe=active'
webbrowser.open(Google)
这里有一些指向 selenium 和 BeautifulSoup
的链接
https://pythonspot.com/selenium-webdriver/
https://realpython.com/beautiful-soup-web-scraper-python/
希望对您有所帮助。
我需要在我的 python 代码中使用特定网站(将英语翻译成我的语言),而且我不想在 python 中使用 googletrans,它的数据量很大,所以我需要使用 python 来快速完成它,是否有任何参考资料或任何标题超出我的阅读范围?或 python 中的任何文档? 谢谢
您可能想考虑使用 selenium 或 BeautifulSoup 与网站交互或网络抓取,但如果您只想打开网站,则可以使用网络浏览器模块。
import webbrowser
Google = 'https://www.google.com/?safe=active&safe=active'
webbrowser.open(Google)
这里有一些指向 selenium 和 BeautifulSoup
的链接https://pythonspot.com/selenium-webdriver/
https://realpython.com/beautiful-soup-web-scraper-python/
希望对您有所帮助。