IOHandler value is Not valid

You found an error in the program ? Report it here
Post Reply
edmhz2012
Posts: 3
Joined: 2019-01-24 12:18:08

IOHandler value is Not valid

Post by edmhz2012 »

Suddenly this error started to appear on Interfilmes and I can't register anything else.
I use version 4.2.2 with the updated scripts. Does anyone have any suggestions on how to solve? :)

by Google Translate
fulvio53s03
Posts: 764
Joined: 2007-04-28 05:46:43
Location: Italy

Re: IOHandler value is Not valid

Post by fulvio53s03 »

Try to change all http to https in Interfilmes script.
:)
edmhz2012
Posts: 3
Joined: 2019-01-24 12:18:08

Re: IOHandler value is Not valid

Post by edmhz2012 »

Perfect solution. Thank you. :clapping:
fulvio53s03
Posts: 764
Joined: 2007-04-28 05:46:43
Location: Italy

Re: IOHandler value is Not valid

Post by fulvio53s03 »

edmhz2012 wrote: 2020-12-05 10:29:06 Perfect solution. Thank you. :clapping:
:grinking:
antp
Site Admin
Posts: 9651
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Re: IOHandler value is Not valid

Post by antp »

Someone posted an updated version of the script I think, but I accidentally deleted the post while deleting spam posts, I'm sorry :/
I updated the script on the server (for "update scripts") with the search/replace of http by https.
In case the updated script was more than that, don't hesitate to repost it.
ronniewoliveira2
Posts: 1
Joined: 2020-12-07 14:50:05

Re: IOHandler value is Not valid

Post by ronniewoliveira2 »

Here we go again. ;)

Code: Select all

(***************************************************

Ant Movie Catalog importation script
www.antp.be/software/moviecatalog/

[Infos]
Authors=Ronniewo2/ronniewoliveira2 (Ronnie Oliveira) / Previous version: Guardião and mikepax
Title=InterFilmes
Description=Movie importation script for InterFilmes.com
Site=http://www.interfilmes.com
Language=BR
Version=2.33
Requires=4.2.1
Comments=Released 07/12/2020
License=This program is free software; you can redistribute it and/or modify it under the  terms of the GNU General Public License as published by the Free Software Foundation;  either version 2 of the License, or (at your option) any later version. |
GetInfo=1
RequiresMovies=1

[Options]

[Parameters]

***************************************************)

program InterFilmes;
var MovieName:string;
uses StringUtils1;

procedure AnalyzeFilmPage(Address:string);
var Page:TStringList;
    valor, valor2:String;
    i:integer;
begin
  Page := TStringList.Create;
  valor:='https://www.interfilmes.com/'+Address;
  valor := StringReplace(valor, 'filme_', 'filme_v1_');
  if pos('-(', valor)>0 then
     valor := TextBefore(valor, '-(', '');
  Page.Text:=GetPage(valor+'.html#Elenco');
  SetField(fieldURL,valor);

  valor:=TextBetween(Page.Text,'</span><span itemprop="description">','</span>');
  HTMLRemoveTags(valor);
  valor:=Utf8Decode(valor);
  SetField(fieldDescription, valor);
 
  //SetField(fieldMediaType, 'BLU-RAY');
 
  valor:=TextBetween(Page.Text,'tulo no Brasil</td>' , '</tr>');
  valor:=TextBetween(valor,'"td2">' , '</td>');
  valor:=Utf8Decode(valor);
  valor2:=TextBetween(Page.Text,'tulo Original</td>' , '</tr>');
  valor2:=TextBetween(valor2,'"alternateName">' , '</td>');
  valor2:=Utf8Decode(valor2);
  SetField(fieldOriginalTitle, valor2);
  SetField(fieldTranslatedTitle, valor);

  valor:=TextBetween(Page.Text,'nero</td>' , '</tr>');
  valor:=TextBetween(valor,'"genre">' , '</td>');
  HTMLRemoveTags(valor);
  valor:=Utf8Decode(valor);
  SetField(fieldCategory,valor);

  valor:=TextBetween(Page.Text,'itemprop="datePublished"' , '</a></td>');
  valor := copy(valor,length(valor)-3,4);
  SetField(fieldYear,valor);
 
  valor:=TextBetween(Page.Text,'class="td1">Dura' , '</tr>');
  valor:=TextBetween(valor,'content="' , '</span>');
  valor := TextAfter(valor, '>');
  HTMLRemoveTags(valor);
  SetField(fieldLength,valor);

  valor:=TextBetween(Page.Text,'<span itemprop="director"' , '</tr>');
  valor:=TextBetween(valor,'="name">' , '</td>');
  valor:=Utf8Decode(valor);
  HTMLRemoveTags(valor);
  SetField(fieldDirector,trim(valor));

  valor:=TextBetween(Page.Text,'s de Origem</td>' , '</tr>');
  valor:=TextBetween(valor,'"td2">' , '</td>');
  HTMLRemoveTags(valor);
  valor:=Utf8Decode(valor);
  SetField(fieldCountry,valor);

  valor:=TextBetween(Page.Text,'<a name="Elenco">' , '</table>');
  valor:=TextAfter(valor,'itemprop="name">');
  HTMLRemoveTags(valor);
  valor:=Utf8Decode(valor);
  valor:=StringReplace(valor,'  ','');
  valor:=StringReplace(valor,#13#10,'  ');
  valor:=StringReplace(valor,'      ',#13#10);
  valor:=StringReplace(valor,'  ','');
  valor:=StringReplace(valor,#9,'');
  if copy(valor,1,1)=' ' then
     Delete(valor,1,1);
  SetField(fieldActors,valor);

  valor:=TextBetween(Page.Text,'<div class="poster"' , '/><div class');
  valor:=TextBetween(valor,'<img src="' , '" width');
  valor:='https://www.interfilmes.com/'+valor;
  GetPicture(valor);

  valor:=TextBetween(Page.Text,'<span itemprop="ratingValue">' , '</span>');
  valor:=FloatToStr(StrToFloat(valor)*2);
  SetField(fieldRating,valor);
  Page.free;
end;

procedure AnalyzePage(Address: String);
var Page:TStringList;
    i:integer;
    nome, url:string;
begin
  PickTreeClear;
  Page := TStringList.Create;
  Page.Text := PostPage(Address,'search='+MovieName);
  i:=0;
  repeat
    i:=FindLine('<div class="nomedofilme">',Page,i+1);
    nome:=Page.GetString(i);
    if (length(nome)>0) then
    begin
      url:=nome;
      url:=TextBetween(url,'<a href="','" title=');
      HTMLRemoveTags(nome);
      nome:=Utf8Decode(nome);
      PickTreeAdd(nome,url);
    end;
  until i=-1;
 if PickTreeExec(Address) then
      AnalyzeFilmPage(Address);
  Page.free;
end;

begin
  PickListClear;
  MovieName := GetField(fieldOriginalTitle);
  if Input('Importar do InterFilmes.com', 'Escreva o nome do filme:', MovieName) then
  begin
    MovieName := StringReplace(MovieName, ' ', '+');
    AnalyzePage('https://www.interfilmes.com/busca.html');
  end;
end.
antp
Site Admin
Posts: 9651
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Re: IOHandler value is Not valid

Post by antp »

Thanks, I published it on the server as version 2.34
sid
Posts: 1
Joined: 2021-03-21 19:42:01

Re: IOHandler value is Not valid

Post by sid »

Uso esse programa desde 2006 sem problemas. Sem nenhum evento relevante, meu problema começou há meses usando o script da Interfilmes e o Ant Movie versão 4.2.0.2 (o que melhor me atende). Desde aquela época: atualizei, o programa e o script. Nada. Pensei que fosse vírus ou malware. Recentemente reinstalei o Windows, não antes de passar HDDLLF em todo o HD, ou seja, limpei tudo para fazer uma instalação do zero. O problema permanece. Todos os scripts estão com problemas - se não é de socket é o IOHandler. Já fiz todos os procedimentos listados como acrescentar s ao http, mas nada. Simplesmente isso está estragando minha experiência com o programa.
antp
Site Admin
Posts: 9651
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Re: IOHandler value is Not valid

Post by antp »

Versions before 4.2.2 do not support TLS 1.2, which is required by more and more sites, so maybe it will be required for this site too...
Post Reply