python - 在 Python 中使用 XPath 抓取 G2 - “Pardon Our Interruption”响应
问题描述
我正在尝试使用 Xpath 在 G2 Crowd 中获取页面的标题,似乎 G2 不允许这样做,因为我得到“请原谅我们的中断”。代码只有几行,并且可以与其他站点一起使用,如何解决?
from requests_html import HTMLSession
session = HTMLSession()
resp = session.get("https://www.g2.com/categories/ipaas")
sites = resp.html.xpath("//title/text()")
print(sites)
我是这方面的新手,请协助如何刮G2。谢谢。
解决方案
推荐阅读
- python - 从列表python中的字符串返回值
- firebase - Dart Vision 客户端库
- botframework - 通过 Bot Framework V4 上的网络聊天使用“凭据”进行语音服务身份验证
- python - Python:如何用其他数组替换数组中的 NaN
- java - 如何连接两个字符串类型列表以创建列表类型的对象?
- flutter - 在 null 和接收器上调用了方法“[]”:null - Flutter Android
- javascript - 在不设置绝对高度的情况下溢出具有大量内容的网格子
- katex - 为什么 KaTeX 没有在本地加载?
- bash - 实时监控,IP不可封
- java - 如何反序列化当前对象