htmlparser icon indicating copy to clipboard operation
htmlparser copied to clipboard

AV Error on parsing

Open ange007 opened this issue 6 years ago • 5 comments

Hello.

bds_2018-11-25_19-40-39 bds_2018-11-25_19-42-34

Uses:

  function getOtherData(const resultPage: string): string;
  var
    elements: IHtmlElementList;
  begin
    try elements := ParserHTML(resultPage).Find('#page_info_wrap .page_name'); except end;
    try if (Assigned(elements)) and (elements.Count > 0) then SetJSONValue(Result, 'fio', elements.Items[0].Text); except end;

    try elements := ParserHTML(resultPage).Find('#page_avatar .page_avatar_img'); except end;
    try if (Assigned(elements)) and (elements.Count > 0) then SetJSONValue(Result, 'avatar', elements.Items[0].Attributes['src']); except end;
  end;

bds_2018-11-25_19-41-37

Climbs an exception. What could be wrong?

ange007 avatar Nov 25 '18 17:11 ange007

Can't help? This is a very sad error.

ange007 avatar Dec 09 '18 14:12 ange007

Sorry, github has not prompted me to have this issue. I can't analyze the reason for this problem from the pictures you provided. If you can, provide the original URL for my test and try to analyze this error. Or consult the original author 武稀松(wr960204). I am not the original author of the HTMLParser library, just added the ability to "modify" and "delete" HTML tags.

ying32 avatar Dec 14 '18 15:12 ying32

The error appears incomprehensible how. When working out of a TThread, the error appears very rarely on the same page (when loading from the TFileStream). But in the TThread - almost always.

ange007 avatar Dec 16 '18 17:12 ange007

I tried to restore some code to fix this error. Or you can use the original author's code http://www.raysoftware.cn/?p=443

ying32 avatar Dec 20 '18 07:12 ying32

Actually the error did not disappear: image

Apparently bad calculation of characters.

Or you can use the original author's code http://www.raysoftware.cn/?p=443

Unfortunately, I do not even know how to write there.

ange007 avatar Jan 04 '19 19:01 ange007