V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
PulpFunction
V2EX  ›  Python

关于使用 splash 的爬虫问题,手册让我懵逼了

  •  
  •   PulpFunction · 2018-08-17 14:17:35 +08:00 · 3699 次点击
    这是一个创建于 2072 天前的主题,其中的信息可能已经有所发展或是发生改变。
    文档在安装时候 https://splash.readthedocs.io/en/latest/install.html
    使用 docker 安装 类似‘ sudo docker run -p 8050:8050 -p 5023:5023 scrapinghub/splash ’的命令启动 splash

    但是在文档代理的部分写着下面的话:
    ‘ If you run Splash using Docker, check Folders Sharing.’
    https://splash.readthedocs.io/en/latest/api.html?highlight=proxy#proxy-profiles

    看安装页都是使用 docker 安装 这不都是使用 docker 安装的吗? If u 是啥意思 splash 还有别的安装途径吗
    9 条回复    2018-08-19 01:57:53 +08:00
    PulpFunction
        1
    PulpFunction  
    OP
       2018-08-17 14:19:09 +08:00
    好像就是有…就在安装下面一点…

    有走过的老哥吗
    PulpFunction
        2
    PulpFunction  
    OP
       2018-08-17 14:29:50 +08:00
    但官网是还是推荐使用 docker 啊
    代理又要文件共享,资料就屁一点
    PulpFunction
        3
    PulpFunction  
    OP
       2018-08-17 14:41:58 +08:00
    用到 scrapy-splash 库 应该不用这么麻烦吧
    好乱啊关系
    PulpFunction
        4
    PulpFunction  
    OP
       2018-08-17 17:45:15 +08:00
    scrapy-splash 真香
    yuanfnadi
        5
    yuanfnadi  
       2018-08-17 18:32:54 +08:00 via iPhone
    你把 dockerfile 里面的命令改成 shell 脚本。不就是可以直接装 linux 上了么。
    cz5424
        6
    cz5424  
       2018-08-18 00:59:13 +08:00 via Android
    docker 跟代理两码事,完全不知道楼主在吐槽什么

    我用 docker 装过 splash,scrapy 代理爬动态网页,没啥问题,就资源占用有点高
    PulpFunction
        7
    PulpFunction  
    OP
       2018-08-18 11:19:45 +08:00
    @cz5424 有关系的,如果不使用第三方库 scrapy-splash,代理只能走文件共享
    昨天下午代理成了, 是因为使用那个三方库了, 主要问题是我代码瞎改……
    关于资源占用,问一下老哥,splash 应该比 sele 那一套轻巧一点?好像没有回收内存的机制啊

    @yuanfnadi 高深 我一直在 linux 上调式的
    XxxxD
        8
    XxxxD  
       2018-08-18 12:14:30 +08:00
    诶,我申请了 splash 的 develop 账号,给了一个 key 什么的,爬虫没问题啊,可以网上找无限制的 api key
    cz5424
        9
    cz5424  
       2018-08-19 01:57:53 +08:00 via Android
    @PulpFunction splash 就像一个隐藏的浏览器在跑网页,资源占用杠杠的,对比 chrome
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5297 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 07:56 · PVG 15:56 · LAX 00:56 · JFK 03:56
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.