- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我想使用 Scrapy Splash 加载本地 HTML 文件并将其另存为 PNG/JPEG,然后删除该 HTML 文件
script = """
splash:go(args.url)
return splash:png()
"""
resp = requests.post('http://localhost:8050/run', json={
'lua_source': script,
'url': 'file://my_file.html'
})
resp.content
Failed loading page (Protocol "" is unknown) Network error #301
yield SplashRequest(url=filepath,
callback=self.parse_result,
meta={'filepath': filepath},
args={
'wait': 0.5,
'png': 1,
},
endpoint='render.html',
)
2020-04-23 12:07:41 [scrapy.downloadermiddlewares.retry] DEBUG: Retrying http://localhost:8050/render.html> (failed 1 times): 502 Bad Gateway
最佳答案
不建议通过底部两个链接使用localhost。有些人提到关闭 Crawlera 解决了他们的问题。它可能试图通过在线 IP 路由您的请求以到达您的本地主机,这将是有问题的。
Scrapy Splash on Ubuntu server: got an unexpected keyword argument 'encoding'
https://github.com/scrapy-plugins/scrapy-splash/issues/108
关于scrapy - 如何在 Scrapy Splash 中加载本地 HTML 文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61386892/
正在构建一个使用一些 Azure 服务和 Scrapy-Splash 的 python Scrapy 应用程序。我尝试在本地 Windows 计算机中使用 scrapinghub/splash:lat
Unhandled promise rejection: Error: No native splash screen registered for given view controller. Ca
我使用这个 link 安装了 Splash .按照所有步骤进行安装,但 Splash 不起作用。 我的settings.py 文件: BOT_NAME = 'Teste' SPIDER_MODULES
我首先使用以下命令在 docker 上运行splash: docker run -p 8050:8050 scrapinghub/splash 当我转到端口 8050 并尝试渲染时: http://w
我使用了来自 repo 的完全相同的代码: https://github.com/pcess/tutorials/tree/master/SplashPermissions repo 中的独立应用程序
我有一个初始图像,它会在页面加载时随我的软件一起加载。 在窗口的当前大小(1024 像素)下,图像以居中方式加载,但是当窗口开始最大化时,它太靠左了。 这是我的CSS: #splash { wid
我有一个应用程序需要在启动前或在后台闲置一段时间后获取一些远程配置文件。我使用加载器 View Controller 来完成这项工作,同时显示带有加载指示器的初始屏幕。 显示加载程序的最佳方式是什么(
我正在尝试抓取 Google Scholar search results并获取与搜索匹配的每个结果的所有 BiBTeX 格式。现在我有一个带有 Splash 的 Scrapy 爬虫。我有一个 lua
我正在尝试将 scrapy 与启动和旋转代理一起使用。这是我的 settings.py: ROBOTSTXT_OBEY = False BOT_NAME = 'mybot' SPIDER_MODULE
我正在使用 FFMPEG 制作包含单个单色 JPG 图像的视频: ffmpeg -y -loop 1 -framerate 30 -t 5 -i SplashBW.jpg Splash.mp4 生成的
我正在尝试使用 fbi 为 Raspbian Stretch 提供启动画面。根据一些教程,我在这里找到了我的情况: /etc/systemd/system/splashscreen.service [
我正在使用Scrapy + Splash来爬网网页,并尝试从google广告横幅和其他广告中提取数据,但是我很难弄清楚要遵循xpath的方式。 我正在使用Scrpay-Splash API渲染页面,以
我已经成功使用此链接通过Tor运行Scrapy:http://pkmishra.github.io/blog/2013/03/18/how-to-run-scrapy-with-TOR-and-mul
我正在尝试抓取一个网站,但需要在所有页面中使用启动画面,因为它们的内容是动态创建的。现在它只呈现第一页,而不是内容页或分页页。 代码如下: import scrapy from scrapy_spla
我想在 Splash 随着时间结束时更改 viewController;我有这个: //Implementación de los métodos: - (void) cargaImagenes{
对于预先知道其个人资料 url 的几个 Disqus 用户中的每一个,我想抓取他们的姓名和他们的关注者的用户名。我正在使用 scrapy 和 splash 这样做。但是,当我解析响应时,它似乎总是在抓
我想做什么 在 avito.ru(俄罗斯房地产网站)上,某人的电话在您点击它之前是隐藏的。我想用Scrapy+Splash收集手机。 示例网址:https://www.avito.ru/moskva/
我正在尝试通过 Python 脚本调用 Splash 来呈现和抓取交互式网站,基本上遵循此 tutorial : import scrapy from scrapy_splash import Spl
我设法使用 scrapy+splash 连接到网站(感谢 this thread )。 我知道我已登录,因为我可以显示您登录后可用的一些元素。但是,当我尝试使用另一个 SplashRequest 访问
当我运行 cordova-splash 命令时出现此错误。获取未处理的错误事件 > > $ cordova-splash > > Checkin
我是一名优秀的程序员,十分优秀!