English > Development

Script for egafd.com

<< < (19/27) > >>

pra15:
So, it's not 'Notes' who is in cause.
The name in the title must be exactly the same as in the web page for working.

But if i use Nicole Segaud, i don't obtain like your sshot2.png, a prlist, the good web page is directly get.

I don't know if it's possible to change title (putting the real name), during the script after choosing a line in the prlist and before getting web page.
I don't know if i'm clear.

Ivek23:

--- Quote ---I don't know if it's possible to change title (putting the real name), during the script after choosing a line in the prlist and before getting web page.
--- End quote ---

Not I know this may be what help you:
КиноПоиск.Ru for movie
КиноПоиск.Ru for people

pra15:
I modified SearchResults :

Before, as i declare RealName only in searchResults delete :
RealName := NomAct; (in getDownloadURL)
Montitle := ...... (in parsepage)


--- Code: ---procedure SearchResults(HTML : string);

///////////////////////////////////////////////////////////////////////////////////////////
var curpos,endpos, counter : Integer; //
    actPosStart, actPosEnd, actalposStart, actalposEnd, urlPosStart, urlposEnd : integer;//
    beforeName, URLTemp, AliasName, NameTemp, RealName : string; //
///////////////////////////////////////////////////////////////////////////////////////////

Begin

//Méthode 2 Nom ou Pseudo
Curpos := Pos(nomAct, HTML);

If curpos > 0 then begin

endPos := curpos;
 
While (curpos > 0) AND (curpos < PosFrom('<h2 class="index">Actress:', HTML, Endpos)) do begin
endpos := curpos;

actPosStart:= PrevPos('>', HTML, curpos);
actPosEnd := Posfrom('</', HTML, actposStart);
NameTemp := Trim(Copy(HTML, actPosStart+1, (actPosEnd-actPosStart-1)));
LogMessage('NameTemp :' + NameTemp);
beforeName := Trim(Copy(HTML, actposStart-3, 1));
logMessage('before Name :'+ beforeName);

If copy(NameTemp,1,9) = 'alias for' then NameTemp := '';

Case NameTemp of
  '' :      Begin                     //Name in alias for ....
            actPosEnd := PosFrom('href="', HTML, actPosEnd);
            end;
           
  nomAct :  Begin                     //Same name as Title
            Case BeforeName of
              'c' : Begin             //Real Name
              RealName := NameTemp;
              AliasName := NameTemp;
              LogMessage('Real Name :' + RealName);
              // Get URL
              urlPosStart := Prevpos('href="', HTML, actposStart);
        urlPosend := PosFrom('" class="', HTML, urlPosstart);
        URLTemp := BASE_URL + Trim(Copy(HTML, urlposStart + 6, (urlPosEnd-urlPosStart-6)));
        LogMessage('URL:' + URLTemp);
        AddMoviePerson(RealName, RealName, '', Lowercase(URLTemp), ctactors);
        AddSearchResult(AliasName, NameTemp, '', LowerCase(URLTemp),'');
              end;
             
              else begin              // Good Name but Alias
              AliasName := NomAct;
              // Real Name
              actalPosStart := Posfrom('alias for ', HTML, actposEnd);
        actalposEnd := Posfrom('</span>', HTML, actalposstart);
        RealName := Trim(Copy(HTML, (actalposStart + 10), (actalposEnd - actalposStart - 10)));
        // Get URL
        urlPosStart := PrevPos('href="', HTML, actPosstart);
        urlPosend := PosFrom('" class="', HTML, urlPosstart);
        URLTemp := BASE_URL + Trim(Copy(HTML, urlposStart + 6, (urlPosEnd-urlPosStart-6)));
        LogMessage('URL :' + URLTemp);
        AddMoviePerson(NomAct, RealName, '', Lowercase(URLTemp), ctactors);
        AddSearchResult(AliasName, NameTemp, '', LowerCase(URLTemp),'');
              end;
            end;
 
            End;
    else begin
    // Alias Name
    actPosStart:= PrevPos('>', HTML, curpos);
    actPosEnd := Posfrom('</', HTML, actposStart);
    AliasName := Trim(Copy(HTML, actPosStart+1, (actPosEnd-actPosStart-1)));
    LogMessage('Alias Name :' + AliasName);
    beforeName := Trim(Copy(HTML, actposStart-3, 1));
   
      Case beforename of
        'c' : Begin                   // Alias is real Name
              // Real Name
              RealName := AliasName;
              LogMessage('Real Name :' + RealName);
              // Get URL
              urlPosStart := Prevpos('href="', HTML, actposStart);
        urlPosend := PosFrom('" class="', HTML, urlPosstart);
        URLTemp := BASE_URL + Trim(Copy(HTML, urlposStart + 6, (urlPosEnd-urlPosStart-6)));
        LogMessage('URL:' + URLTemp);
        AddMoviePerson(NomAct, RealName, '', Lowercase(URLTemp), ctactors);
        AddSearchResult(AliasName, RealName, '', LowerCase(URLTemp),'');
              end;
        else begin
              // Real Name
              actalPosStart := Posfrom('alias for ', HTML, actposEnd);
        actalposEnd := Posfrom('</span>', HTML, actalposstart);
        RealName := Trim(Copy(HTML, (actalposStart + 10), (actalposEnd - actalposStart - 10)));
        NameTemp := 'alias for ' + Realname;
        // Get URL
        urlPosStart := PrevPos('href="', HTML, actPosstart);
        urlPosend := PosFrom('" class="', HTML, urlPosstart);
        URLTemp := BASE_URL + Trim(Copy(HTML, urlposStart + 6, (urlPosEnd-urlPosStart-6)));
        LogMessage('URL :' + URLTemp);
        AddMoviePerson(NomAct, RealName, '', Lowercase(URLTemp), ctactors);
        AddSearchResult(AliasName, NameTemp, '', LowerCase(URLTemp),'');
        end;
              end;
      end;
    end;

curpos := PosFrom(nomAct, HTML, actPosEnd);

end;

end;

end;
--- End code ---

It seems to work!
We can now search with part of name or part of alias name (only if the part is in good alphabetic page).

Ivek23:

--- Quote ---It seems to work!
We can now search with part of name or part of alias name (only if the part is in good alphabetic page).
--- End quote ---

That's it, now is the correct  search result.

pra15:
Merry Christmas!

Sorry, no connection since 3 days.

I noted a problem with search procedure.
Sometimes the prlist not appears and PVD get automatically one page.

For ewample if you search Natacha, the script download info of Natacha but in the egafd (N) page there are other Natacha ( Natacha [2] , Natacha [3].....), so i would like that in the prlist i can choose the good natacha.
I you have an idea why the prlist not appears?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version