Ejemplo n.º 1
0
        protected override async Task ExecuteAsync(CancellationToken stoppingToken)
        {
            await _spiderFactory.AddRequestsAsync("https://www1.hkex.com.hk/hkexwidget/data/getequityquote?sym=700&token=evLtsLsBNAUVTPxtGqVeG2kWK2tkRx82BArPtGQBbW8FuTNNILpbHnxN9ScxYlfV&lang=chi&qid=1602811160864&callback=jQuery35106208578400623672_1602811160864&_=1602811160864");

            await _spiderFactory.AddRequestsAsync("https://www1.hkex.com.hk/hkexwidget/data/getequityquote?sym=701&token=evLtsLsBNAUVTPxtGqVeG2kWK2tkRx82BArPtGQBbW8FuTNNILpbHnxN9ScxYlfV&lang=chi&qid=1602811160864&callback=jQuery35106208578400623672_1602811160864&_=1602811160864");

            _spiderFactory.AddDataFlow(new MyDataFlow());
            _spiderFactory.SetName("Test_Spider");
            await _spiderFactory.ExecuteAsync(stoppingToken);
        }