@@ -57,7 +57,7 @@ protected IqdbEngine(string b) : base(b)
5757 ] ;
5858
5959
60- private async Task < IDocument > GetDocumentAsync ( SearchQuery query , CancellationToken ct )
60+ protected override async Task < IDocument > GetDocumentAsync ( SearchResult sr , SearchQuery query , CancellationToken token = default )
6161 {
6262
6363 IDocument document = null ;
@@ -94,7 +94,7 @@ private async Task<IDocument> GetDocumentAsync(SearchQuery query, CancellationTo
9494 m . AddString ( "url" , query . Upload ) ;
9595
9696 return ;
97- } , cancellationToken : ct ) ;
97+ } , cancellationToken : token ) ;
9898
9999 /*
100100 var response = await Client.Request(URL_QUERY)
@@ -119,7 +119,7 @@ private async Task<IDocument> GetDocumentAsync(SearchQuery query, CancellationTo
119119 var s = await response . GetStringAsync ( ) . ConfigureAwait ( false ) ;
120120
121121 var parser = new HtmlParser ( ) ;
122- document = await parser . ParseDocumentAsync ( s , ct ) . ConfigureAwait ( false ) ;
122+ document = await parser . ParseDocumentAsync ( s , token ) . ConfigureAwait ( false ) ;
123123
124124 // goto ret;
125125
@@ -162,11 +162,11 @@ protected override ValueTask<IEnumerable<IHtmlCollection<IElement>>> GetSource(I
162162 return ValueTask . FromResult ( select ) ;
163163 }
164164
165- protected override ValueTask < IEnumerable < IqdbItem > > GetItems ( IEnumerable < IHtmlCollection < IElement > > ree , SearchResult r )
165+ protected override ValueTask < IEnumerable < IqdbItem > > GetItems ( IEnumerable < IHtmlCollection < IElement > > source , SearchResult r )
166166 {
167167 var buf = new List < IqdbItem > ( ) ;
168168
169- foreach ( var c in ree )
169+ foreach ( var c in source )
170170 {
171171 var iq = IqdbItem . ParseResultItem ( c , r ) ;
172172 buf . Add ( iq ) ;
@@ -220,8 +220,6 @@ public record IqdbItem : SearchResultItem, ISourceItemParseable<IHtmlCollection<
220220
221221 private IqdbItem ( SearchResult r ) : base ( r ) { }
222222
223- #region Implementation of ISourceItemParseable<in INode,out IqdbItem>
224-
225223 public static IqdbItem ParseResultItem ( IHtmlCollection < IElement > tr , SearchResult r )
226224 {
227225
@@ -323,6 +321,4 @@ public static IqdbItem ParseResultItem(IHtmlCollection<IElement> tr, SearchResul
323321 return result ;
324322 }
325323
326- #endregion
327-
328324}
0 commit comments