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
chjf2008
V2EX  ›  Python

lua 脚本调用 splash 内存不回收 怎么处理 第一次发帖。

  •  
  •   chjf2008 · 2020-09-18 16:25:41 +08:00 · 1227 次点击
    这是一个创建于 1383 天前的主题,其中的信息可能已经有所发展或是发生改变。

    安装了在 docker 上安装了 splash,用 scrapy 调用了 4 个网页请求,执行了 lua,请求结束了,但是内存不回收,如何处理?

    2 条回复    2020-09-18 17:16:01 +08:00
    knightdf
        1
    knightdf  
       2020-09-18 16:52:10 +08:00
    是不是用全局变量了,lua 非 local 变量全部是全局变量
    chjf2008
        2
    chjf2008  
    OP
       2020-09-18 17:16:01 +08:00
    @knightdf lua 只是设置了一个 select 的值 然后点击按钮
    document.getElementById("quantity").options[document.getElementById("quantity").selectedIndex].value=9999;document.querySelector("#add-to-cart-button").click()
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   1310 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 23:19 · PVG 07:19 · LAX 16:19 · JFK 19:19
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.