Python Scrapy Splash如何实现代理配置文件?
我在将Scrapy Splash与HTTP代理一起使用时遇到了一些问题(请参阅),即使我尝试设置以下代理配置文件时也是如此 为了更好地理解正在发生的事情,我正在寻找Scrapy Splash源代码的一部分,它解析Python Scrapy Splash如何实现代理配置文件?,python,scrapy,scrapy-splash,Python,Scrapy,Scrapy Splash,我在将Scrapy Splash与HTTP代理一起使用时遇到了一些问题(请参阅),即使我尝试设置以下代理配置文件时也是如此 为了更好地理解正在发生的事情,我正在寻找Scrapy Splash源代码的一部分,它解析.ini文件中/etc/Splash/proxy profiles中指定的代理主机和端口 但是,在存储库中搜索“proxy”或“.ini”不会产生任何结果。有人能给我解释一下代理配置文件是如何在Scrapy Splash中实现的吗?首先,Scrapy Splash代理设置在/etc/Sp
.ini
文件中/etc/Splash/proxy profiles
中指定的代理主机和端口
但是,在存储库中搜索“proxy”或“.ini”不会产生任何结果。有人能给我解释一下代理配置文件是如何在Scrapy Splash中实现的吗?首先,Scrapy Splash代理设置在/etc/Splash/proxy profiles
中,但是如果您在容器中运行Splash,您可以通过-v
将主机代理配置文件映射到容器,例如:
sudo docker run -p 8050:8050 -v /etc/splash/proxy-profiles:/etc/splash/proxy-profiles scrapinghub/splash
localhost:8050/render.html?url=http://target.com?wait=1&timeout=2&proxy=filename
其次,当通过splash访问url时,如果代理配置文件名不是default.ini
,则需要一个代理参数,例如:
sudo docker run -p 8050:8050 -v /etc/splash/proxy-profiles:/etc/splash/proxy-profiles scrapinghub/splash
localhost:8050/render.html?url=http://target.com?wait=1&timeout=2&proxy=filename
首先,Scrapy Splash代理设置位于/etc/Splash/proxy profiles
中,但如果在容器中运行Splash,则可以通过-v
将主机代理配置文件映射到容器,例如:
sudo docker run -p 8050:8050 -v /etc/splash/proxy-profiles:/etc/splash/proxy-profiles scrapinghub/splash
localhost:8050/render.html?url=http://target.com?wait=1&timeout=2&proxy=filename
其次,当通过splash访问url时,如果代理配置文件名不是default.ini
,则需要一个代理参数,例如:
sudo docker run -p 8050:8050 -v /etc/splash/proxy-profiles:/etc/splash/proxy-profiles scrapinghub/splash
localhost:8050/render.html?url=http://target.com?wait=1&timeout=2&proxy=filename
对不起,到底是什么问题?你读过吗,它对你有用吗?对不起,到底是什么问题?你读过吗,它对你有用吗?