English > Development

Script for egafd.com

<< < (13/27) > >>

pra15:
Thanks, good work!
It's interesting to add new infos.
But with this method, the info of country for exemple will be always for the last movie of Alternate Titles.
I think it should be better to use the origtitle and compare it with the list of alternate Titles, and if the same title is in the list, we can search data in this line. (of country, if it's a dvd, or studio)

Ivek23:
For Url

--- Quote from: Ivek23 on December 08, 2011, 07:24:05 pm ---I'm sorry, my mistake, added to the Cast wrong url  code,
This is the right URL codes.

--- Code: ---// get url
          UrlPosStart := PosFrom('href="', HTML, EndPos) + 6;
          UrlPosEnd := PosFrom('">', HTML, UrlPosStart);
          URL := BASE_URL + Trim(Copy(HTML, UrlPosStart, UrlPosEnd - UrlPosStart));
          LogMessage(URL);
--- End code ---

ADDED IS NOW ALSO CORRECT egafd_mod7 script for movie attached.
--- End quote ---

Thanks
What is your best should be.
What is better, it should be.

For egafd people slight adjustment in the Bio
--- Code: ---// Get Role (Now defined)
     difpos := (PosFrom('<i>', HTML, (actposEnd-1))+4) - actposend;
     logmessage('DIFFERENCE : ' + intToStr(difpos));

     If difpos > 0 then begin
    If difpos < 200 then begin

            actPosStart := PosFrom('<i>', HTML, (actposend-1)) + 4;
            {actPosStart := PosFrom('> <i>', HTML, actPosStart) + 6;}
            actPosEnd:=PosFrom('</i></li>', HTML, actPosStart) - 1;
            Role := Trim(Copy(HTML, actposStart, (actPosEnd - actPosStart)));
    Role := StringReplace(Role, ';', '  - ', true, false, true);
    Role := StringReplace(Role, '/', ' - ', true, false, true);
            if Pos(', ', Role) = 1 then Delete(Role, 1, 2);
            LogMessage('Role: ' + Role);
     
            debug_pos1:=Pos('(',Role);
            if debug_pos1 >0 then
            Role:= Copy(Role,0,debug_pos1-1);
            LogMessage(Role);

        end;
     end;
--- End code ---

pra15:
Hello,
I think the data of country, dvd ... are not organise in egafd to make that's you want.
If Title is Original, infos are in top, else they are in alternate titles and infos are not separated!

So i opted for this solution, it's not perfect but simple :

Declare altposStart, altposEnd as integer


--- Code: ---//AKA - Titles...
   dbgstrg := '';
   LogMessage('getting all titles')
   Curpos := Pos('<th>Alternate Titles</th>' ,HTML);
   EndPos := curPos;

////
while (curPos > 0) AND (curPos < PosFrom('<th>Actresses</th>', HTML, EndPos)) do begin
         EndPos := curPos;
         actPosStart := PosFrom('class="flma"', HTML, EndPos);
         actPosEnd := PosFrom('</span>', HTML, actPosStart);
         dbgstrg := Trim(Copy(HTML, (actPosstart + 13), (actPosEnd - actPosStart - 13) ));
         LogMessage('AKA: ' + dbgstrg);

if Copy(HTML, (actposend + 7), 5)  <> '</li>' then begin
AltposEnd := Posfrom('</li>', HTML, actposend);
AltposStart := PrevPos('>', HTML, altPosEnd);
dbgstrg := dbgstrg + ' •' + copy(HTML, (altposstart +1), (altPosEnd - altPosStart-1));
end;

If dbgstrg <> '' then
          AddFieldValue(mfAka, dbgstrg);

         curpos := PosFrom('class="flma"', HTML, actPosEnd);
////
end;
--- End code ---

I taked only the part Notes of alternate title, other infos are not for me very important!

Have you try code for Birthplace and Birthday in egafd people ?

Ivek23:

--- Quote ---Have you try code for Birthplace and Birthday in egafd people ?
--- End quote ---

Not yet, because I had yesterday morning denied access to the Internet, which I could not fix, so I had a new load computer, so I need time somehow one day or more to add all the programs and the rest of what he needed to operate a computer as needed, so I announced news about this until tomorrow, if the right.
Greeting

pra15:
I had a problem too with access to videobb, a page said me i had virus or spyware who send spam, i made a scan with my antivirus and antispyware and i found nothing. Finally i restarted my computer and my router and all was ok!

????

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version