English > Scripts and Templates
Iafd Person e Website link (full)
Ivek23:
How would give this code
--- Code: ---// Buy This Movie - DVD
curPos := PosFrom('<h4>DVD</h4>',HTML,EndPos);
if curPos > 0 then begin
endPos := curPos;
Curpos := Posfrom('shopclick.asp?sku=', HTML, Curpos);
while (curPos > 0) AND (curPos < PosFrom('<h4>DVD RENTALS</h4>', HTML, endPos)) do begin
curPos := curPos + Length('shopclick.asp?sku=');
Endpos := PosFrom('">', HTML, Curpos);
URL3 := 'http://www.iafd.com/shopclick.asp?sku=' + Copy(HTML, Curpos, Endpos- Curpos);
// Get Name
Curpos := PosFrom('">', HTML, Endpos) + 2;
endPos := PosFrom('</a> - ', HTML, curPos);
Name3 := Copy(HTML, curPos, endPos-curPos);
Curpos := PosFrom('</a> -', HTML, Endpos);
if curPos > 0 then begin
curPos := curPos + Length('</a> -');
endPos := curPos+8;
Price := Trim(Copy(HTML, curPos, endPos-curPos));
Price := StringReplace(Price,'<','',true,false,true);
end;
// Fullinfo BioField:
If URL3 <> '' then
begin
dbgstrg7 := dbgstrg7+'<link url="'+URL3+'">'+Name3+'</link> - '+Price+'<br>';
end;
Curpos := Posfrom('shopclick.asp?sku=', HTML, Curpos);
end;
If dbgstrg7 <> '' then dbgstrg7 := dbgstrg7;
AddCustomFieldValueByName('IAFD DVD - Buy This Movie',dbgstrg7);
If dbgstrg7<> '' then fullinfo2:= fullinfo2 + 'DVD :' + #13#10 + dbgstrg7
else fullinfo2:= fullinfo2;
end else
curPos := endPos;
--- End code ---
to regulate, it would not be necessary always to change this piece of code
--- Code: --- while (curPos > 0) AND (curPos < PosFrom('<h4>DVD RENTALS</h4>', HTML, endPos)) do begin
--- End code ---
to this part of the code
--- Code: --- while (curPos > 0) AND (curPos < PosFrom('<h4>Used DVDs</h4>', HTML, endPos)) do begin
--- End code ---
or by that part of the code
--- Code: --- while (curPos > 0) AND (curPos < PosFrom('<h3>Usage Notice</h3>', HTML, endPos)) do begin
--- End code ---
I think it would be necessary to add a function in which to combine these pieces of code (I do not know how to write code for this function), such as for example:
" <h4>DVD RENTALS</h4> "
" <h4>Used DVDs</h4> "
" <h3>Usage Notice</h3> "
Here are a few links:
http://www.iafd.com//title.rme/title=10+hardcore+quickies+2/year=2011/10-hardcore-quickies-2.htm
http://www.iafd.com//title.rme/title=2+chicks+same+time+15/year=2013/2-chicks-same-time-15.htm
http://www.iafd.com//title.rme/title=all+internal+234/year=2005/all-internal-234.htm
http://www.iafd.com//title.rme/title=anal+attack+8/year=2011/anal-attack-8.htm
http://www.iafd.com//title.rme/title=100%25+natural+wonders+1/year=2004/100%25-natural-wonders-1.htm
http://www.iafd.com//title.rme/title=10+man+cum+slam+13/year=2005/10-man-cum-slam-13.htm
http://www.iafd.com//title.rme/title=2+men+inside+me/year=2007/2-men-inside-me.htm
http://www.iafd.com//title.rme/title=2+on+1+14/year=2002/2-on-1-14.htm
http://www.iafd.com//title.rme/title=3+day+rule/year=2012/3-day-rule.htm
Please help to resolve this problem, recommended the use of iafd_movie (BuyThisMovie) script.
Ivek23:
--- Quote from: Ivek23 on April 11, 2015, 12:20:54 pm ---How would give this code
--- Code: ---// Buy This Movie - DVD
curPos := PosFrom('<h4>DVD</h4>',HTML,EndPos);
if curPos > 0 then begin
endPos := curPos;
Curpos := Posfrom('shopclick.asp?sku=', HTML, Curpos);
while (curPos > 0) AND (curPos < PosFrom('<h4>DVD RENTALS</h4>', HTML, endPos)) do begin
curPos := curPos + Length('shopclick.asp?sku=');
Endpos := PosFrom('">', HTML, Curpos);
URL3 := 'http://www.iafd.com/shopclick.asp?sku=' + Copy(HTML, Curpos, Endpos- Curpos);
// Get Name
Curpos := PosFrom('">', HTML, Endpos) + 2;
endPos := PosFrom('</a> - ', HTML, curPos);
Name3 := Copy(HTML, curPos, endPos-curPos);
Curpos := PosFrom('</a> -', HTML, Endpos);
if curPos > 0 then begin
curPos := curPos + Length('</a> -');
endPos := curPos+8;
Price := Trim(Copy(HTML, curPos, endPos-curPos));
Price := StringReplace(Price,'<','',true,false,true);
end;
// Fullinfo BioField:
If URL3 <> '' then
begin
dbgstrg7 := dbgstrg7+'<link url="'+URL3+'">'+Name3+'</link> - '+Price+'<br>';
end;
Curpos := Posfrom('shopclick.asp?sku=', HTML, Curpos);
end;
If dbgstrg7 <> '' then dbgstrg7 := dbgstrg7;
AddCustomFieldValueByName('IAFD DVD - Buy This Movie',dbgstrg7);
If dbgstrg7<> '' then fullinfo2:= fullinfo2 + 'DVD :' + #13#10 + dbgstrg7
else fullinfo2:= fullinfo2;
end else
curPos := endPos;
--- End code ---
to regulate, it would not be necessary always to change this piece of code
--- Code: --- while (curPos > 0) AND (curPos < PosFrom('<h4>DVD RENTALS</h4>', HTML, endPos)) do begin
--- End code ---
to this part of the code
--- Code: --- while (curPos > 0) AND (curPos < PosFrom('<h4>Used DVDs</h4>', HTML, endPos)) do begin
--- End code ---
or by that part of the code
--- Code: --- while (curPos > 0) AND (curPos < PosFrom('<h3>Usage Notice</h3>', HTML, endPos)) do begin
--- End code ---
I think it would be necessary to add a function in which to combine these pieces of code (I do not know how to write code for this function), such as for example:
" <h4>DVD RENTALS</h4> "
" <h4>Used DVDs</h4> "
" <h3>Usage Notice</h3> "
Here are a few links:
http://www.iafd.com//title.rme/title=10+hardcore+quickies+2/year=2011/10-hardcore-quickies-2.htm
http://www.iafd.com//title.rme/title=2+chicks+same+time+15/year=2013/2-chicks-same-time-15.htm
http://www.iafd.com//title.rme/title=all+internal+234/year=2005/all-internal-234.htm
http://www.iafd.com//title.rme/title=anal+attack+8/year=2011/anal-attack-8.htm
http://www.iafd.com//title.rme/title=100%25+natural+wonders+1/year=2004/100%25-natural-wonders-1.htm
http://www.iafd.com//title.rme/title=10+man+cum+slam+13/year=2005/10-man-cum-slam-13.htm
http://www.iafd.com//title.rme/title=2+men+inside+me/year=2007/2-men-inside-me.htm
http://www.iafd.com//title.rme/title=2+on+1+14/year=2002/2-on-1-14.htm
http://www.iafd.com//title.rme/title=3+day+rule/year=2012/3-day-rule.htm
Please help to resolve this problem, recommended the use of iafd_movie (BuyThisMovie) script.
--- End quote ---
This part of the code
--- Code: ---function BuyThisMovies(BuyThisMovie : String) : String;
var
curPos, EndPos : Integer;
I : Integer;
TabNames : TwideArray;
begin
TabNames := ['<h4>DVD</h4>', '<h4>DVD RENTALS</h4>', '<h4>Used DVDs</h4>', '<h3>Usage Notice</h3>'];
//TabNames := ['DVD','DVD RENTALS', 'Used DVDs', 'Usage Notice'];
For I := Low(TabNames) to High(TabNames) do
begin
Result := TabNames[I];
end;
end;
--- End code ---
does not work, if anyone can help.
pra15:
hello,
Sorry, before make a function, i need understand more that you want exactly.
You give 3 possibilities for condition to stop. But i see some pages (links up) and there are more than one possibilities in the page (ex: h4 dvdrentals and h3 usage notice on the same page).
You must choose a priority if you want stop the code. For exemple if i found h3 usage first i don't search h4 dvdrental.
I don't know if i'm clear (always my bad english). If you can explain me exactly what you want.
Ivek23:
--- Quote from: pra15 on April 11, 2015, 07:26:07 pm ---hello,
Sorry, before make a function, i need understand more that you want exactly.
You give 3 possibilities for condition to stop. But i see some pages (links up) and there are more than one possibilities in the page (ex: h4 dvdrentals and h3 usage notice on the same page).
You must choose a priority if you want stop the code. For exemple if i found h3 usage first i don't search h4 dvdrental.
I don't know if i'm clear (always my bad english). If you can explain me exactly what you want.
--- End quote ---
For example:
For transmission of DVD information on this http://www.iafd.com//title.rme/title=3+day+rule/year=2012/3-day-rule.htm and many similar IAFD movie pages use this piece of code,
--- Code: ---// Buy This Movie - DVD
curPos := PosFrom('<h4>DVD</h4>',HTML,EndPos);
if curPos > 0 then begin
endPos := curPos;
Curpos := Posfrom('shopclick.asp?sku=', HTML, Curpos);
while (curPos > 0) AND (curPos < PosFrom('<h4>DVD RENTALS</h4>', HTML, endPos)) do begin
curPos := curPos + Length('shopclick.asp?sku=');
Endpos := PosFrom('">', HTML, Curpos);
URL3 := 'http://www.iafd.com/shopclick.asp?sku=' + Copy(HTML, Curpos, Endpos- Curpos);
// Get Name
Curpos := PosFrom('">', HTML, Endpos) + 2;
endPos := PosFrom('</a> - ', HTML, curPos);
Name3 := Copy(HTML, curPos, endPos-curPos);
Curpos := PosFrom('</a> -', HTML, Endpos);
if curPos > 0 then begin
curPos := curPos + Length('</a> -');
endPos := curPos+8;
Price := Trim(Copy(HTML, curPos, endPos-curPos));
Price := StringReplace(Price,'<','',true,false,true);
end;
// Fullinfo BioField:
If URL3 <> '' then
begin
dbgstrg7 := dbgstrg7+'<link url="'+URL3+'">'+Name3+'</link> - '+Price+'<br>';
end;
Curpos := Posfrom('shopclick.asp?sku=', HTML, Curpos);
end;
If dbgstrg7 <> '' then dbgstrg7 := dbgstrg7;
AddCustomFieldValueByName('IAFD DVD - Buy This Movie',dbgstrg7);
If dbgstrg7<> '' then fullinfo2:= fullinfo2 + 'DVD :' + #13#10 + dbgstrg7
else fullinfo2:= fullinfo2;
end else
curPos := endPos;
--- End code ---
which is on the web page followed by the DVD RENTALS record information.
Where there is no DVD RENTALS record information, followed Used DVDs record information, this part of the code
--- Code: ---// Buy This Movie - DVD
curPos := PosFrom('<h4>DVD</h4>',HTML,EndPos);
if curPos > 0 then begin
endPos := curPos;
Curpos := Posfrom('shopclick.asp?sku=', HTML, Curpos);
while (curPos > 0) AND (curPos < PosFrom('<h4>Used DVDs</h4>', HTML, endPos)) do begin
curPos := curPos + Length('shopclick.asp?sku=');
Endpos := PosFrom('">', HTML, Curpos);
URL3 := 'http://www.iafd.com/shopclick.asp?sku=' + Copy(HTML, Curpos, Endpos- Curpos);
// Get Name
Curpos := PosFrom('">', HTML, Endpos) + 2;
endPos := PosFrom('</a> - ', HTML, curPos);
Name3 := Copy(HTML, curPos, endPos-curPos);
Curpos := PosFrom('</a> -', HTML, Endpos);
if curPos > 0 then begin
curPos := curPos + Length('</a> -');
endPos := curPos+8;
Price := Trim(Copy(HTML, curPos, endPos-curPos));
Price := StringReplace(Price,'<','',true,false,true);
end;
// Fullinfo BioField:
If URL3 <> '' then
begin
dbgstrg7 := dbgstrg7+'<link url="'+URL3+'">'+Name3+'</link> - '+Price+'<br>';
end;
Curpos := Posfrom('shopclick.asp?sku=', HTML, Curpos);
end;
If dbgstrg7 <> '' then dbgstrg7 := dbgstrg7;
AddCustomFieldValueByName('IAFD DVD - Buy This Movie',dbgstrg7);
If dbgstrg7<> '' then fullinfo2:= fullinfo2 + 'DVD :' + #13#10 + dbgstrg7
else fullinfo2:= fullinfo2;
end else
curPos := endPos;
--- End code ---
used to download DVD information.
Where there is no DVD RENTALS record information or Used DVDs record information, on each side IAFD movie compulsory Usage Notice record information, this part of the code
--- Code: ---// Buy This Movie - DVD
curPos := PosFrom('<h4>DVD</h4>',HTML,EndPos);
if curPos > 0 then begin
endPos := curPos;
Curpos := Posfrom('shopclick.asp?sku=', HTML, Curpos);
while (curPos > 0) AND (curPos < PosFrom('<h3>Usage Notice</h3>', HTML, endPos)) do begin
curPos := curPos + Length('shopclick.asp?sku=');
Endpos := PosFrom('">', HTML, Curpos);
URL3 := 'http://www.iafd.com/shopclick.asp?sku=' + Copy(HTML, Curpos, Endpos- Curpos);
// Get Name
Curpos := PosFrom('">', HTML, Endpos) + 2;
endPos := PosFrom('</a> - ', HTML, curPos);
Name3 := Copy(HTML, curPos, endPos-curPos);
Curpos := PosFrom('</a> -', HTML, Endpos);
if curPos > 0 then begin
curPos := curPos + Length('</a> -');
endPos := curPos+8;
Price := Trim(Copy(HTML, curPos, endPos-curPos));
Price := StringReplace(Price,'<','',true,false,true);
end;
// Fullinfo BioField:
If URL3 <> '' then
begin
dbgstrg7 := dbgstrg7+'<link url="'+URL3+'">'+Name3+'</link> - '+Price+'<br>';
end;
Curpos := Posfrom('shopclick.asp?sku=', HTML, Curpos);
end;
If dbgstrg7 <> '' then dbgstrg7 := dbgstrg7;
AddCustomFieldValueByName('IAFD DVD - Buy This Movie',dbgstrg7);
If dbgstrg7<> '' then fullinfo2:= fullinfo2 + 'DVD :' + #13#10 + dbgstrg7
else fullinfo2:= fullinfo2;
end else
curPos := endPos;
--- End code ---
used to download DVD information.
Conclusion:
How to create a single piece of code, which would be a universal transfer DVD information, and they would be one part of the code used (replacement) instead of the three above mentioned parts of codes.
I hope it will now be easier to understand the request and thank you in advance for your efforts and assistance.
pra15:
It's not exactly what you want,
I made a script for all data in Buy This Movie grouped on one customfield. The code is shortly.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version