jtsai
V2EX  ›  问与答

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

  •  
  •   jtsai · Dec 4, 2017 · 2421 views
    This topic created in 3279 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
    wangjue19931126
    Dec 4, 2017
    1
    爬虫和 egg 有啥关系?
    hanzichi
    hanzichi
    Dec 4, 2017
    2
    node 写爬虫不需要页面了吧,直接 node xx.js 好了
    jtsai
    jtsai
    OP
    Dec 4, 2017 via Android
    3
    @hanzichi 嗯 我其实想问有没有办法直接在终端运行基于 http 的程序
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1922 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 15:28 · PVG 23:28 · LAX 07:28 · JFK 10:28
    ♥ Do have faith in what you're doing.