English > Development
Script for egafd.com
pra15:
Thank you, i'll see that, i'm working in search procedure in egafd_movie!
Ivek23:
--- Quote from: pra15 on December 27, 2011, 04:14:59 pm ---Thank you, i'll see that, i'm working in search procedure in egafd_movie!
--- End quote ---
Thanks, I look forward to the results of the work.
Ivek23:
* Corrected link to Web Sites and Internet Clubs and Groups.
The code is now as follows:
--- Code: ---end; /////----- End of infos in <Films>
//if (Lien <> '') AND (Born = '') then
//AddFieldValue(pfBio, Lien);
//if (Lien <> '') AND (Born <> '') then
//AddFieldValue(pfBio, Born + #13#10 + Lien);
if (Lien <> '') AND (Born2 = '') then
AddFieldValue(pfBio, Lien);
if (Lien <> '') AND (Born2 <> '') then
AddFieldValue(pfBio, Born2 + #13#10 + Lien);
end;
/////----- Infos in <Web Sites>
If Pos('<th>Films</th>', HTML) > 0 then begin
// WEB SITES: //
curpos := Pos('<th>Web Sites</th>', HTML);
LogMessage('Web Sites readout');
if curPos > 0 then begin
Sites := ' • • Web Sites • • ';
endPos := curPos;
curPos := PosFrom('<a class="lnk" target="_new" href="', HTML, curPos);
while (curPos > 0) AND (curPos < PosFrom('<p class="cpyrgt" align="center">', HTML, endPos)) do begin
curPos := curPos + Length('<a class="lnk" target="_new" href="');
endPos := PosFrom('">', HTML, curPos);
URL1 := Copy(HTML, curPos, endPos - curPos);
URL1 := BASE_URL + URL1;
curPos := endPos + 2;
endPos := PosFrom('</a></li>', HTML, curPos);
Name := Copy(HTML, curPos, endPos - curPos);
/// Total Line: ///
If Sites <> '' then
Sites := Sites + #13;
If URL1 <> '' then
Sites := Sites + '<link url="' + URL1 + '">' + Name + '</link>';
LogMessage('WEB SITES :' + Sites);
curPos := PosFrom('<a href="', HTML, actPosEnd);
end;
end; /////----- End of infos in <Web Sites>
If Sites <> '' then
//AddFieldValueXML('comment', Sites);
LogMessage('WEB SITES :' + Sites);
fullinfo:= fullinfo + Sites + #13;
LogMessage(fullinfo);
//AddFieldValueXML('comment', fullinfo);
end;
/////----- Infos in <Internet Clubs and Groups>
If Pos('<th>Internet Clubs and Groups</th>', HTML) > 0 then begin
// CLUB AND GROUPS: //
curpos := Pos('<th>Internet Clubs and Groups</th>', HTML);
LogMessage('Internet Clubs and Groups readout');
if curPos > 0 then begin
Sites1 := ' • • Internet Clubs and Groups: • •';
If Sites1 <> '' then
Sites1 := Sites1;
LogMessage('CLUB AND GROUPS :' + Sites1);
If Sites1 <> '' then
//AddFieldValueXML('comment', Sites1);
LogMessage('CLUB AND GROUPS :' + Sites1);
fullinfo:= fullinfo + #13 + Sites1 + #13;
LogMessage(fullinfo);
//AddFieldValueXML('comment', fullinfo);
end;
end; /////----- End of infos in <Internet Clubs and Groups>
/////----- Infos in <Bomis Rings>
If Pos('<li>Bomis Rings:</li>', HTML) > 0 then begin
// BOMIS: //
curpos := Pos('<li>Bomis Rings:</li>', HTML);
LogMessage('Bomis Rings readout');
if curPos > 0 then begin
Bomis := ' • Bomis •';
endPos := curPos;
curPos := PosFrom('<a class="lnk" target="_new" href="', HTML, curPos);
while (curPos > 0) AND (curPos < PosFrom('</ul>', HTML, endPos)) do begin
curPos := curPos + Length('<a class="lnk" target="_new" href="');
endPos := PosFrom('">', HTML, curPos);
URL1 := Copy(HTML, curPos, endPos - curPos);
URL1 := BASE_URL + URL1;
curPos := endPos + 2;
endPos := PosFrom('</a></li>', HTML, curPos);
Name := Copy(HTML, curPos, endPos - curPos);
/// Total Line: ///
If Bomis <> '' then
Bomis := Bomis + #13;
If URL1 <> '' then
Bomis := Bomis + '<link url="' + URL1 + '">' + Name + '</link>';
LogMessage('BOMIS :' + Bomis);
curPos := PosFrom('<a class="lnk" target="_new" href="', HTML, curPos);
end;
end; /////----- End of infos in <Bomis Rings>
If Bomis <> '' then
//AddFieldValueXML('comment', Bomis);
LogMessage('BOMIS :' + Bomis);
fullinfo:= fullinfo + Bomis + #13;
LogMessage(fullinfo);
//AddFieldValueXML('comment', fullinfo);
end;
/////----- Infos in <MSN Groups>
If Pos('<li>MSN Groups:</li>', HTML) > 0 then begin
// MSN: //
curpos := Pos('<li>MSN Groups:</li>', HTML);
LogMessage('MSN Groups readout');
if curPos > 0 then begin
MSN := ' • MSN •';
endPos := curPos;
curPos := PosFrom('<a class="lnk" target="_new" href="', HTML, curPos);
while (curPos > 0) AND (curPos < PosFrom('</ul>', HTML, endPos)) do begin
curPos := curPos + Length('<a class="lnk" target="_new" href="');
endPos := PosFrom('">', HTML, curPos);
URL1 := Copy(HTML, curPos, endPos - curPos);
URL1 := BASE_URL + URL1;
curPos := endPos + 2;
endPos := PosFrom('</a></li>', HTML, curPos);
Name := Copy(HTML, curPos, endPos - curPos);
/// Total Line: ///
If MSN <> '' then
MSN := MSN + #13;
If URL1 <> '' then
MSN := MSN + '<link url="' + URL1 + '">' + Name + '</link>';
LogMessage ('MSN :' + MSN);
curPos := PosFrom('<a class="lnk" target="_new" href="', HTML, curPos);
end;
end; /////----- End of infos in <MSN Groups>
If MSN <> '' then
//AddFieldValueXML('comment', MSN);
LogMessage('MSN :' + MSN);
fullinfo:= fullinfo + MSN + #13;
LogMessage(fullinfo);
//AddFieldValueXML('comment', fullinfo);
end;
/////----- Infos in <MySpace>
If Pos('<li>MySpace:</li>', HTML) > 0 then begin
// MYSPACE: //
curpos := Pos('<li>MySpace:</li>', HTML);
LogMessage('MySpace readout');
if curPos > 0 then begin
MySpace := ' • MySpace •';
endPos := curPos;
curPos := PosFrom('<a class="lnk" target="_new" href="', HTML, curPos);
while (curPos > 0) AND (curPos < PosFrom('</ul>', HTML, endPos)) do begin
curPos := curPos + Length('<a class="lnk" target="_new" href="');
endPos := PosFrom('">', HTML, curPos);
URL1 := Copy(HTML, curPos, endPos - curPos);
URL1 := BASE_URL + URL1;
curPos := endPos + 2;
endPos := PosFrom('</a></li>', HTML, curPos);
Name := Copy(HTML, curPos, endPos - curPos);
/// Total Line: ///
If MySpace <> '' then
MySpace := MySpace + #13;
If URL1 <> '' then
MySpace := MySpace + '<link url="' + URL1 + '">' + Name + '</link>';
LogMessage('MYSPACE :' + MySpace);
curPos := PosFrom('<a class="lnk" target="_new" href="', HTML, curPos);
end;
end; /////----- End of infos in <MySpace>
If MySpace <> '' then
//AddFieldValueXML('comment', MySpace);
LogMessage('MYSPACE :' + MySpace);
fullinfo:= fullinfo + MySpace + #13;
LogMessage(fullinfo);
//AddFieldValueXML('comment', fullinfo);
end;
/////----- Infos in <Wikipedia>
If Pos('<li>Wikipedia:</li>', HTML) > 0 then begin
// WIKIPEDIA: //
curpos := Pos('<li>Wikipedia:</li>', HTML);
LogMessage('Wikipedia readout');
if curPos > 0 then begin
Wikipedia := ' • Wikipedia •';
endPos := curPos;
curPos := PosFrom('<a class="lnk" target="_new" href="', HTML, curPos);
while (curPos > 0) AND (curPos < PosFrom('</ul>', HTML, endPos)) do begin
curPos := curPos + Length('<a class="lnk" target="_new" href="');
endPos := PosFrom('">', HTML, curPos);
URL1 := Copy(HTML, curPos, endPos - curPos);
URL1 := BASE_URL + URL1;
curPos := endPos + 2;
endPos := PosFrom('</a></li>', HTML, curPos);
Name := Copy(HTML, curPos, endPos - curPos);
/// Total Line: ///
If Wikipedia <> '' then
Wikipedia := Wikipedia + #13;
If URL1 <> '' then
Wikipedia := Wikipedia + '<link url="' + URL1 + '">' + Name + '</link>';
LogMessage('WIKIPEDIA :' + Wikipedia);
curPos := PosFrom('<a class="lnk" target="_new" href="', HTML, curPos);
end;
end; /////----- End of infos in <Wikipedia>
If Wikipedia <> '' then
//AddFieldValueXML('comment', Wikipedia);
LogMessage('WIKIPEDIA :' + Wikipedia);
fullinfo:= fullinfo + Wikipedia + #13;
LogMessage(fullinfo);
//AddFieldValueXML('comment', fullinfo);
end;
/////----- Infos in <Yahoo! Groups>
If Pos('<li>Yahoo! Groups:</li>', HTML) > 0 then begin
// YAHOO: //
curpos := Pos('<li>Yahoo! Groups:</li>', HTML);
LogMessage('Yahoo! Groups readout');
if curPos > 0 then begin
Yahoo := #10 + ' • Yahoo! Groups •';
endPos := curPos;
curPos := PosFrom('<a class="lnk" target="_new" href="', HTML, curPos);
while (curPos > 0) AND (curPos < PosFrom('</ul>', HTML, endPos)) do begin
curPos := curPos + Length('<a class="lnk" target="_new" href="');
endPos := PosFrom('">', HTML, curPos);
URL1 := Copy(HTML, curPos, endPos - curPos);
URL1 := BASE_URL + URL1;
curPos := endPos + 2;
endPos := PosFrom('</a></li>', HTML, curPos);
Name := Copy(HTML, curPos, endPos - curPos);
/// Total Line: ///
If Yahoo <> '' then
Yahoo := Yahoo + #13;
If URL1 <> '' then
Yahoo := Yahoo + '<link url="' + URL1 + '">' + Name + '</link>';
LogMessage('YAHOO :' + Yahoo);
curPos := PosFrom('<a class="lnk" target="_new" href="', HTML, curPos);
end;
end; /////----- End of infos in <Yahoo! Groups>
If Yahoo <> '' then
//AddFieldValueXML('comment', Yahoo);
LogMessage('YAHOO :' + Yahoo);
fullinfo:= fullinfo + Yahoo + #13;
LogMessage(fullinfo);
//AddFieldValueXML('comment', fullinfo);
end;
AddFieldValueXML('comment', fullinfo);
// Photo:
curPos :=Pos('src="/actresses/id/',HTML);
if curPos > 0 then begin
EndPos := PosFrom('" width', HTML, curPos);
PhotoURL := BASE_URL + Copy(HTML, curPos + 5, EndPos - curPos - 5);
LogMessage('URL de la photo: '+ PhotoURL);
{PhotoURL := HTMLToText (PhotoURL);}
AddImageURL(4, PhotoURL);
end
else begin
PhotoURL := '';
end;
end;
--- End code ---
pra15:
Here egafd_Movie with search procedure.
I change a little :
If no result in the actual page (first letter alphabetic), prlist show others alphabetic pages for choice an other page.
I use two different searching sentence, the complete Title or a combination of the two first words of the title (we can improve more possibilities easily later).
For example :
Title = The Starter ====> The script search : 'the stater' and 'starter'
Title = The Young Starter =====> 'the young starter' and 'young'
Title = Starter, The ======> 'the starter' and 'starter' (if option in PVD place The in the end)
I made some test and it seems to work but.....
False there are bugs,
First change in GetDownloadUrl :
--- Code: ---firstStr := LowerCase(Copy(nMovie, 1, (Length(nMovie)-(Length(nMovie)-1))));
--- End code ---
and
--- Code: ---//Search:
I:= 0;
While (I < nSearch) AND (ifFind = 0) do Begin
logMessage ('while commence');
--- End code ---
[attachment deleted by admin]
Ivek23:
Already added the aforementioned changes.
egafd_people (pra15)15 script added
[attachment deleted by admin]
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version