mirror of
https://github.com/xboxeer/NScrapy.git
synced 2026-10-29 12:39:57 +08:00
Involve HtmlAgilityPack and HtmlAgilityPack.CssSelector.NetCore in Infra To help Getting element through CSS Selector
32 lines
752 B
C#
32 lines
752 B
C#
using NScrapy.Infra;
|
|
using System;
|
|
using System.Threading;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace NScrapy.Engine
|
|
{
|
|
public class NScrapyEngine:IEngine
|
|
{
|
|
public IResponse ProcessRequest(IRequest request)
|
|
{
|
|
//Put request to Downloader pool
|
|
|
|
//Waiting for Downloader Complete
|
|
//Once Completed, send response to ReponseDistributer
|
|
|
|
//return response;
|
|
throw new NotImplementedException();
|
|
}
|
|
|
|
|
|
public async Task<IResponse> ProcessRequestAsync(IRequest request)
|
|
{
|
|
var response = await Downloader.Downloader.SendRequestAsync(request);
|
|
return response;
|
|
}
|
|
|
|
}
|
|
}
|