V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
推荐学习书目
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
Ewig
V2EX  ›  Python

请问一下 scrapy 想让框架默认 python3 是这样写吗?

  •  
  •   Ewig · Oct 8, 2018 · 1894 views
    This topic created in 2761 days ago, the information mentioned may be changed or developed.

    就是写一个 main.py 然后 python3 执行,但是这样的问题如果很多爬虫,是不是对应很多 main 呢? from scrapy.cmdline import execute

    if name == 'main':

    execute("scrapy crawl xiaomiquan".split())
    
    2 replies    2018-10-09 15:02:56 +08:00
    wlsnx
        1
    wlsnx  
       Oct 8, 2018
    virtualenv/venv/pyenv 考虑一下?
    Ewig
        2
    Ewig  
    OP
       Oct 9, 2018
    @wlsnx 这个我用过的,挺麻烦的
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   806 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 20:33 · PVG 04:33 · LAX 13:33 · JFK 16:33
    ♥ Do have faith in what you're doing.