推荐学习书目
› 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 · 2130 views
    This topic created in 2908 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   ·   Privacy   ·   Solana   ·   2728 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 53ms · UTC 03:15 · PVG 11:15 · LAX 20:15 · JFK 23:15
    ♥ Do have faith in what you're doing.