Author Topic: Iafd Person e Website link (full)  (Read 83007 times)

0 Members and 6 Guests are viewing this topic.

Offline pra15

  • Older Power User
  • *****
  • Posts: 173
    • View Profile
Re: Iafd Person e Website link (full)
« Reply #40 on: February 09, 2015, 09:45:27 am »
Thanks,
For the moment i use my script to add good url and script genre_people to all database.
After i sort by genre, with two IAFD/IAFD i delete manually all bad URL.

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2713
    • View Profile
Re: Iafd Person e Website link (full)
« Reply #41 on: February 09, 2015, 09:53:43 am »
Thanks,
For the moment i use my script to add good url and script genre_people to all database.
After i sort by genre, with two IAFD/IAFD i delete manually all bad URL.

Otherwise it is a bit more work, but currently there is no other, no other variants as already mentioned above.
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2713
    • View Profile
Re: Iafd Person e Website link (full)
« Reply #42 on: February 11, 2015, 03:15:24 pm »
iafd_movie (full) script
v 0.2.6.0 on 11.2.2015


Change of Studio:
  • Studio name only in IAFD Studio multiselect custom field
  • The URL link to the Studio name on web pages in IAFD Studio1 memo custom field

Change of Studio:
  • The URL link to the Studio name on web pages now in IAFD Studio (Distributor)  memo custom field

Distributor data can now be transferred only in custom fields, namely:
  • Distributor name only in Distributor multiselect custom field
  • The URL link to the Distributor name on web pages in IAFD Distributor1 memo custom field

Change of Distributor:
  • The URL link to the Distributor name on web pages now in IAFD Studio (Distributor) memo custom field

Replace the new changes in the Comments:

Change of Comments:

In addition to the already mentioned here are a few cosmetic changes in the comment box for the transmission of Comments information.

New Added:
  • IAFDUpdated in the IAFDUpdated long text custom field
  • IAFD Compilation in the IAFD Compilation select list or multiselectlist custom field

Also included is a list of custom fields.

CustomField :

IAFDUpdated                        ----> Long Text
IAFD AKA                        ----> Memo
IAFD Studio                      ----> Multiselect List
IAFD Distributor                   ----> Multiselect List
IAFD Studio (Distributor)            ----> Memo
IAFD Compilation                  ----> Select List OR Multiselect List


Script is the attached.
« Last Edit: March 15, 2015, 08:49:06 am by Ivek23 »
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2713
    • View Profile
Re: Iafd Person e Website link (full)
« Reply #43 on: February 12, 2015, 04:01:32 pm »
How would give this code
Code: [Select]
// Comments - Released
curPos := Pos('<h3>Comments</h3>', HTML);
if curPos > 0 then begin
LogMessage('Scene readout');
EndPos := curPos;
curPos := PosFrom ('<li style="padding-bottom: 0.5em;">Released:',HTML,curPos);
if curPos > 0 then begin
curPos := PosFrom('">Released:',HTML,curPos);
if curPos > 0 then begin
curPos := curPos + Length('">Released:');
EndPos := PosFrom('</li><',HTML,curPos);
Datanascita := Copy(HTML,curPos,EndPos-curPos); 
LogMessage(Datanascita);
if Datanascita <> '' then begin
ExplodeString(Datanascita, DateParts, ' ');

DateParts[0] := StringReplace(DateParts[0], '01', '1', True, True, False);
DateParts[0] := StringReplace(DateParts[0], '02', '2', True, True, False);
DateParts[0] := StringReplace(DateParts[0], '03', '3', True, True, False);
DateParts[0] := StringReplace(DateParts[0], '05', '5', True, True, False);
DateParts[0] := StringReplace(DateParts[0], '06', '6', True, True, False);
DateParts[0] := StringReplace(DateParts[0], '07', '7', True, True, False);
DateParts[0] := StringReplace(DateParts[0], '08', '8', True, True, False);
DateParts[0] := StringReplace(DateParts[0], '09', '9', True, True, False);

DateParts[1] := StringReplace(DateParts[1],'January','1',true,true,true);
DateParts[1] := StringReplace(DateParts[1],'February','2',true,true,true);
DateParts[1] := StringReplace(DateParts[1],'March','3',true,true,true);
DateParts[1] := StringReplace(DateParts[1],'April','4',true,true,true);
DateParts[1] := StringReplace(DateParts[1],'May','5',true,true,true);
DateParts[1] := StringReplace(DateParts[1],'June','6',true,true,true);
DateParts[1] := StringReplace(DateParts[1],'July','7',true,true,true);
DateParts[1] := StringReplace(DateParts[1],'August','8',true,true,true);
DateParts[1] := StringReplace(DateParts[1],'September','9',true,true,true);
DateParts[1] := StringReplace(DateParts[1],'October','10',true,true,true);
DateParts[1] := StringReplace(DateParts[1],'November','11',true,true,true);
DateParts[1] := StringReplace(DateParts[1],'December','12',true,true,true);

Datanascita:= DateParts[0] +'.'+ DateParts[1] +'.'+ DateParts[2];
LogMessage('release : '+ Datanascita);

AddFieldValueXML('release', Datanascita);

end
else
LogMessage('release not found');
end
else
LogMessage('Data di nascita: NESSUNA');
end;
end;
to regulate, it would not be necessary always to use this piece of code
Code: [Select]
DateParts[0] := StringReplace(DateParts[0], '01', '1', True, True, False);
DateParts[0] := StringReplace(DateParts[0], '02', '2', True, True, False);
DateParts[0] := StringReplace(DateParts[0], '03', '3', True, True, False);
DateParts[0] := StringReplace(DateParts[0], '05', '5', True, True, False);
DateParts[0] := StringReplace(DateParts[0], '06', '6', True, True, False);
DateParts[0] := StringReplace(DateParts[0], '07', '7', True, True, False);
DateParts[0] := StringReplace(DateParts[0], '08', '8', True, True, False);
DateParts[0] := StringReplace(DateParts[0], '09', '9', True, True, False);

DateParts[1] := StringReplace(DateParts[1],'January','1',true,true,true);
DateParts[1] := StringReplace(DateParts[1],'February','2',true,true,true);
DateParts[1] := StringReplace(DateParts[1],'March','3',true,true,true);
DateParts[1] := StringReplace(DateParts[1],'April','4',true,true,true);
DateParts[1] := StringReplace(DateParts[1],'May','5',true,true,true);
DateParts[1] := StringReplace(DateParts[1],'June','6',true,true,true);
DateParts[1] := StringReplace(DateParts[1],'July','7',true,true,true);
DateParts[1] := StringReplace(DateParts[1],'August','8',true,true,true);
DateParts[1] := StringReplace(DateParts[1],'September','9',true,true,true);
DateParts[1] := StringReplace(DateParts[1],'October','10',true,true,true);
DateParts[1] := StringReplace(DateParts[1],'November','11',true,true,true);
DateParts[1] := StringReplace(DateParts[1],'December','12',true,true,true);
repeatedly used to Released date converted to this format,  for example, as follows
Code: [Select]
30.10.2013
I guess it would be necessary to add to the script similar functions like this, for example,
Code: [Select]
// ******** CheckDate ************** Преобразовывает строку с датой в короткий формат ****
function CheckDate(s: String): String;
var
i, j, num        : Integer;
months           : Array [1..12] of AnsiString;
items            : TWideArray;
Day, Month, Year : String;
begin
months[ 1] := 'январ';
months[ 2] := 'феврал';
months[ 3] := 'март';
months[ 4] := 'апрел';
months[ 5] := 'ма';
months[ 6] := 'июн';
months[ 7] := 'июл';
months[ 8] := 'август';
months[ 9] := 'сентябр';
months[10] := 'октябр';
months[11] := 'ноябр';
months[12] := 'декабр';

ExplodeString (s, items, ' ');
for i := 0 to 2 do begin
if i > High (items) then Break;

num := StrToInt (items[i]);
if num > 0 then begin   // День или год
if num <= 31 then    // День
Day := items[i]
else if (num >= 1000) And (num <= 2200) then begin // Год
Year := items[i];
Break;   // Год - последний
end;
end else begin    // Месяц
for j := Low (months) to High (months) do
if Pos (months[j], LowerCase (items[i])) > 0 then Break;
end;
if j <= High (months) then
Month := IntToStr (j);
end;

if Year <> '' then begin
if Day = '' then
Day := '01'
else if length (Day) = 1 then
Day := '0' + Day;
if Month = '' then
Month := '01'
else if length (Month) = 1 then
Month := '0' + Month;
Result := Day + '.' + Month + '.' + Year;
end else
Result := s;
end;


// ******** CheckDates ************** Преобразовывает строку с датами, разделенными запятыми, в короткий формат ****
function CheckDates (s: String): String;
var
Dates  : TWideArray;
i      : integer;
Begin
ExplodeString (Replace (s), Dates, ',');
Result := '';
for i := low (Dates) to high (Dates) do begin
if Result = '' then
Result := Result + CheckDate (Dates[i])
else
Result := Result + ',' + CheckDate (Dates[i]);
end;
End;
but this I have never used and I admit that I do not know how to do this, so please help, I would be happy with the attached code.
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline pra15

  • Older Power User
  • *****
  • Posts: 173
    • View Profile
Re: Iafd Person e Website link (full)
« Reply #44 on: February 12, 2015, 04:59:21 pm »
Can you give a link where h3 comments is present .


Offline pra15

  • Older Power User
  • *****
  • Posts: 173
    • View Profile
Re: Iafd Person e Website link (full)
« Reply #46 on: February 12, 2015, 07:48:23 pm »
I don't know if that you want.
You can use the function for date like : 01 Septembre 2002 or September 01, 2002.
But for the third i don't know how. With '/' in the text i always obtain an error in PVD.
I tried explode the date or simply copy(.... but nothing work!

Code: [Select]
function ConfDate(OrigDate:string):string;
Var
i : Integer;
OrigDate, d, m, y : string;
TabMonths : Array of string;
TabDate : TwideArray;

BEGIN
TabMonths := ['Null','January','February','March','April','May','June','Jully','August','Septembre','October','November','December'];
ExplodeString(OrigDate,TabDate,' ');
If TabDate[0] <> '' then begin
If Length(TabDate[0]) > 2 then begin
m := TabDate[0];
For i := 1 to 12 do begin
If m = TabMonths[i] then m:=IntToStr(i);
end;
LogMessage('Mois: ' + m);
d := Copy(TabDate[1],1,Length(TabDate[1])-1);
If Copy(TabDate[1],1,Length(TabDate[1])-2) = '0' then d:= Copy(TabDate[1],2,1);
y := TabDate[2];
end else if TabDate[1] <> '' then begin
y:= TabDate[2];
m:= TabDate[1];
For i := 1 to 12 do begin
If m = TabMonths[i] then m:=IntToStr(i);
end;
d:= TabDate[0];
If Copy(TabDate[0],1,Length(TabDate[0])-1) = '0' then d:= Copy(TabDate[0],2,1);
LogMessage('Year: ' + y + ' month: ' + m + ' day: ' + d);
end else begin
y:='';
m:='';
d:='';
end;
//end else begin
//ExplodeString(OrigDate,TabDate,'/');
//y := Copy(OrigDate,7,4);
//m := Copy(OrigDate,3,3);
//For i := 1 to 12 do begin
//If m = Copy(TabMonths[i],1,3) then m:=IntToStr(i);
//end;
//d := Copy(OrigDate,1,2);
//If Copy(TabDate[0],1,Length(TabDate[0])-1) = '0' then d:= Copy(TabDate[0],2,Length(TabDate[0])-1);
//LogMessage('Annee: '+y+' mois: ' +m+' jour: '+d);
end;
Result:= d + '.' + m + '.' + y;
END;

If this can help.

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2713
    • View Profile
Re: Iafd Person e Website link (full)
« Reply #47 on: February 12, 2015, 08:00:26 pm »
If this can help.

Thanks, will see ...
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2713
    • View Profile
Re: Iafd Person e Website link (full)
« Reply #48 on: February 13, 2015, 03:05:00 pm »
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2713
    • View Profile
Re: Iafd Person e Website link (full)
« Reply #49 on: February 14, 2015, 02:20:48 pm »
iafd_movie (full) script
v 0.0.2.6 on 14.2.2015


Change of Studio:
  • Studio name only in IAFD Studio multiselect custom field
  • The URL link to the Studio name on web pages in IAFD Studio1 memo custom field

Change of Studio:
  • The URL link to the Studio name on web pages now in IAFD Studio (Distributor)  memo custom field

Distributor data can now be transferred only in custom fields, namely:
  • Distributor name only in Distributor multiselect custom field
  • The URL link to the Distributor name on web pages in IAFD Distributor1 memo custom field

Change of Distributor:
  • The URL link to the Distributor name on web pages now in IAFD Studio (Distributor) memo custom field

New Added:
  • IAFDUpdated in the IAFDUpdated long text custom field

Also included is a list of custom fields.

CustomField :

IAFDUpdated                        ----> Long Text
IAFD AKA                        ----> Memo
IAFD Studio                      ----> Multiselect List
IAFD Distributor                   ----> Multiselect List
IAFD Studio (Distributor)            ----> Memo

Script is the attached.
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2713
    • View Profile
Re: Iafd Person e Website link (full)
« Reply #50 on: February 15, 2015, 09:54:01 am »
iafd_movie (full) script
v 0.2.6.5 on 15.2.2015


I fixed bug in Honors and Awards data transfer.

Change of  CustomField :

Quote
CustomField :

IAFDUpdated                        ----> Long Text
IAFD AKA                        ----> Memo
IAFD Studio                      ----> Multiselect List
IAFD Distributor                   ----> Multiselect List
IAFD Studio (Distributor)            ----> Memo
IAFD Compilation                  ----> Select List OR Multiselect List
IAFD Studio                      ----> Select List OR Multiselect List
IAFD Distributor                   ----> Select List OR Multiselect List

Script is the attached.
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2713
    • View Profile
Re: Iafd Person e Website link (full)
« Reply #51 on: February 16, 2015, 06:28:11 pm »
iafd_movie(Release) script
v 0.2.5.0 on 16.2.2015


There is now an example of how the above mentioned code now add to the iafd_movie (Release) script and how it works for the transmission of  Released, Release Date, DVD Release, First release and Date of Production data.

CustomField :

IAFDUpdated                  ----> Long Text
IAFD Comments               ----> Memo
IAFD Released               ----> Short Text OR Long Text
IAFD Release Date            ----> Short Text OR Long Text
DVD release                  ----> Short Text OR Long Text
First release               ----> Short Text OR Long Text
Production date               ----> Short Text OR Long Text
Production dates            ----> Short Text OR Long Text


Script is the attached.
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2713
    • View Profile
Re: Iafd Person e Website link (full)
« Reply #52 on: March 15, 2015, 12:13:39 pm »
iafd_movie (full) script
v 0.2.7.0 on 15.3.2015


New Added:
  • IAFD Magazine Reviews in the IAFD Magazine Reviews memo custom field
and this function
Code: [Select]
function HTMLValue(HTML: string; StartPos, EndPos: Integer; StartValue, EndValue: string): string;
var
  ValueStart, ValueEnd: Integer;
begin
  ValueStart := PosFrom(StartValue, HTML, StartPos);
  if (ValueStart > 0) and ((ValueStart < EndPos) or (EndPos = 0)) then
  begin
    ValueStart := ValueStart + Length(StartValue);
    ValueEnd := PosFrom(EndValue, HTML, ValueStart);
    Result := Copy(HTML, ValueStart, ValueEnd - ValueStart);
  end else
    Result := '';
end;

CustomField :

IAFD Magazine Reviews            ----> Memo


IAFD Magazine Reviews is also added in comment box.

Transfer information Comments the now only in the IAFD Comments -
Add of  CustomField :
IAFD  Comments            ----> Memo


Script is the attached.
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2713
    • View Profile
Re: Iafd Person e Website link (full)
« Reply #53 on: March 19, 2015, 12:55:30 pm »
iafd_movie script
v 0.0.2.8 on 19.3.2015


New Added:
  • IAFD Compilation in the IAFD Compilation select list or multiselectlist custom field

Also included is a list of custom fields.

CustomField :

IAFDUpdated                        ----> Long Text
IAFD AKA                        ----> Memo
IAFD Studio                      ----> Multiselect List
IAFD Distributor                   ----> Multiselect List
IAFD Studio (Distributor)            ----> Memo
IAFD Compilation                  ----> Select List OR Multiselect List
IAFD Compilation is also added in comment box.

Is also added DVD Bonus in Scene Breakdowns.


Script is the attached.
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2713
    • View Profile
Re: Iafd Person e Website link (full)
« Reply #54 on: March 29, 2015, 01:22:29 pm »
iafd_movie(BuyThisMovie) script
v 0.2.7.5 on 29.3.2015


If anyone is interested in Buy This Movie Information is attached below iafd_movie (BuyThisMovie) script with some information, which are listed in the list of custom fields.

Also included is a list of custom fields.

CustomField :

IAFD Buy This Movie                  ----> Memo

IAFD HD-DVD - Buy This Movie         ----> Memo
IAFD DL(HD) - Buy This Movie         ----> Memo
IAFD Pre-Owned BR - Buy This Movie      ----> Memo
IAFD Rent BR - Buy This Movie         ----> Memo
IAFD BR - Buy This Movie            ----> Memo
IAFD DL - Buy This Movie            ----> Memo
IAFD DVD - Buy This Movie            ----> Memo
IAFD Used DVDs - Buy This Movie         ----> Memo


Script is the attached.
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2713
    • View Profile
Re: Iafd Person e Website link (full)
« Reply #55 on: April 11, 2015, 12:20:54 pm »
How would give this code
Code: [Select]
// 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;
to regulate, it would not be necessary always to change this piece of code
Code: [Select]
while (curPos > 0) AND (curPos < PosFrom('<h4>DVD RENTALS</h4>', HTML, endPos)) do beginto this part of the code
Code: [Select]
while (curPos > 0) AND (curPos < PosFrom('<h4>Used DVDs</h4>', HTML, endPos)) do beginor by that part of the code
Code: [Select]
while (curPos > 0) AND (curPos < PosFrom('<h3>Usage Notice</h3>', HTML, endPos)) do begin
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
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2713
    • View Profile
Re: Iafd Person e Website link (full)
« Reply #56 on: April 11, 2015, 12:22:16 pm »
How would give this code
Code: [Select]
// 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;
to regulate, it would not be necessary always to change this piece of code
Code: [Select]
while (curPos > 0) AND (curPos < PosFrom('<h4>DVD RENTALS</h4>', HTML, endPos)) do beginto this part of the code
Code: [Select]
while (curPos > 0) AND (curPos < PosFrom('<h4>Used DVDs</h4>', HTML, endPos)) do beginor by that part of the code
Code: [Select]
while (curPos > 0) AND (curPos < PosFrom('<h3>Usage Notice</h3>', HTML, endPos)) do begin
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.

This part of the code
Code: [Select]
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;
does not work, if anyone can help.
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline pra15

  • Older Power User
  • *****
  • Posts: 173
    • View Profile
Re: Iafd Person e Website link (full)
« Reply #57 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.

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2713
    • View Profile
Re: Iafd Person e Website link (full)
« Reply #58 on: April 12, 2015, 07:17:01 am »
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.

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: [Select]
// 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;
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: [Select]
// 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;
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: [Select]
// 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;
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.
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline pra15

  • Older Power User
  • *****
  • Posts: 173
    • View Profile
Re: Iafd Person e Website link (full)
« Reply #59 on: April 12, 2015, 08:24:52 pm »
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.