jtsai
V2EX  ›  问与答

(求助)我用 egg.js 写了一个爬虫,但却不知道怎么运行

  •  
  •   jtsai · Dec 4, 2017 · 2116 views
    This topic created in 3081 days ago, the information mentioned may be changed or developed.

    之前爬虫是用 python 写的,要在命令行运行很简单:python crawl.py

    但是 egg.js 是基于 http 的,触发这个爬虫程序要通过这个 URL: http://127.0.0.1/crawl 于是我就不知道在命令行正确运行的方式是什么? 有这样搞的吗? 怎么搞?

    3 replies    2017-12-04 18:25:11 +08:00
    wangjue19931126
        1
    wangjue19931126  
       Dec 4, 2017
    爬虫和 egg 有啥关系?
    hanzichi
        2
    hanzichi  
       Dec 4, 2017
    node 写爬虫不需要页面了吧,直接 node xx.js 好了
    jtsai
        3
    jtsai  
    OP
       Dec 4, 2017 via Android
    @hanzichi 嗯 我其实想问有没有办法直接在终端运行基于 http 的程序
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5645 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 44ms · UTC 03:39 · PVG 11:39 · LAX 20:39 · JFK 23:39
    ♥ Do have faith in what you're doing.