Skip to content

Commit

Permalink
pecintakomik, fix base url on image url
Browse files Browse the repository at this point in the history
fix #147
  • Loading branch information
riderkick committed Jan 10, 2016
1 parent 3373ecb commit 5cf296a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions baseunits/modules/PecintaKomik.pas
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ function GetImageURL(var DownloadThread: TDownloadThread; const AURL: String;
Module: TModuleContainer): Boolean;
var
query: TXQueryEngineHTML;
s: String;
s, b: String;
begin
Result:=False;
if DownloadThread=nil then Exit;
Expand All @@ -113,9 +113,10 @@ function GetImageURL(var DownloadThread: TDownloadThread; const AURL: String;
query:=TXQueryEngineHTML.Create;
try
query.ParseHTML(StreamToString(Document));
b:=query.XPathString('//base/@href');
if b='' then b:=Module.RootURL;
s:=query.XPathString('//img[@class="picture"]/@src');
if s<>'' then
PageLinks[DownloadThread.workCounter]:=MaybeFillHost(Module.RootURL,s);
if s<>'' then PageLinks[DownloadThread.workCounter]:=MaybeFillHost(b,s);
finally
query.Free;
end;
Expand Down

0 comments on commit 5cf296a

Please sign in to comment.