Author Topic: Script: FilmAffinity [ES] (Easy Script)  (Read 95393 times)

0 Members and 3 Guests are viewing this topic.

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2740
    • View Profile
Re: Script: FilmAffinity [ES] (Easy Script)
« Reply #40 on: May 24, 2016, 06:50:50 am »
Thank very much, Ivek23 for maintaining the program  ;D.

You are Welcome and thank you.

Attached the new version.

Thank you for the new version.
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline jippo

  • User
  • ***
  • Posts: 31
    • View Profile
Re: Script: FilmAffinity [ES] (Easy Script)
« Reply #41 on: May 27, 2016, 08:51:05 pm »
I have a problem.


Offline Am-rA

  • Member
  • *
  • Posts: 19
    • View Profile
Re: Script: FilmAffinity [ES] (Easy Script)
« Reply #42 on: May 29, 2016, 10:48:30 am »

Ivek thank people like you is what makes it good that Internet is to remain standing  :D

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2740
    • View Profile
Re: Script: FilmAffinity [ES] (Easy Script)
« Reply #43 on: May 29, 2016, 12:22:01 pm »

Ivek thank people like you is what makes it good that Internet is to remain standing  :D

Thanks, Am-rA
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: 2740
    • View Profile
Re: Script: FilmAffinity [ES] (Easy Script)
« Reply #44 on: May 29, 2016, 12:52:58 pm »
I have a problem.

The solution to this problem is decorated.

I fixed this problem:

This is added to the code:
Code: [Select]
ItemList:=StringReplace(ItemList,'<div class="credits">','',True,True,False);            //WEB_SPECIFIC
    ItemList:=StringReplace(ItemList,'<span>','',True,True,False);            //WEB_SPECIFIC
    ItemList:=StringReplace(ItemList,'</span>','',True,True,False);            //WEB_SPECIFIC
ItemList:=StringReplace(ItemList,'</div>','',True,True,False);            //WEB_SPECIFIC

Corrected code is such now:
Code: [Select]
         //Get ~Writers~ (Only name in Web from !name! list).
         curPos:=Pos('<dt>Guión</dt>',HTML);                                          //WEB_SPECIFIC
         if 0<curPos then begin
            curPos:=curPos+Length('<dt>Guión</dt>');                                  //WEB_SPECIFIC
            curPos:=PosFrom('<dd>',HTML,curPos)+Length('<dd>');                       //WEB_SPECIFIC
            endPos:=PosFrom('</dd>',HTML,curPos);                                     //WEB_SPECIFIC
            ItemList:=Copy(HTML,curPos,endPos-curPos);
ItemList:=StringReplace(ItemList,'<div class="credits">','',True,True,False);            //WEB_SPECIFIC
    ItemList:=StringReplace(ItemList,'<span>','',True,True,False);            //WEB_SPECIFIC
    ItemList:=StringReplace(ItemList,'</span>','',True,True,False);            //WEB_SPECIFIC
ItemList:=StringReplace(ItemList,'</div>','',True,True,False);            //WEB_SPECIFIC
            LogMessage('           Parse results List Writers:'+ItemList+'||');
            curPos:=1;                                                                 //WEB_SPECIFIC
            endPos:=PosFrom(', ',ItemList,curPos);                                    //WEB_SPECIFIC
            if 0=endPos then ItemValue:=Copy(ItemList,curPos,1+Length(ItemList)-curPos);
            While 0<endPos do begin
               ItemValue:=Copy(ItemList,curPos,endPos-curPos);
               AddMoviePerson(ItemValue,'','','',ctWriters);
               LogMessage('      Get results Writers:'+ItemValue+'||');
               curPos:=endPos+Length(', ');                                           //WEB_SPECIFIC
               endPos:=PosFrom(', ',ItemList,curPos);                                 //WEB_SPECIFIC
               if 0=endPos then ItemValue:=Copy(ItemList,curPos,1+Length(ItemList)-curPos);
            end;
            AddMoviePerson(ItemValue,'','','',ctWriters);
            LogMessage('      Get results Writers:'+ItemValue+'||');
          end;
         //Get ~Composers~ (Only name in Web from !name! list).
         curPos:=Pos('<dt>Música</dt>',HTML);                                      //WEB_SPECIFIC
         if 0<curPos then begin
            curPos:=curPos+Length('<dt>Música</dt>');                                 //WEB_SPECIFIC
            curPos:=PosFrom('<dd>',HTML,curPos)+Length('<dd>');                       //WEB_SPECIFIC
            endPos:=PosFrom('</dd>',HTML,curPos);                                     //WEB_SPECIFIC
            ItemList:=Copy(HTML,curPos,endPos-curPos);
ItemList:=StringReplace(ItemList,'<div class="credits"><span>','',True,True,False);            //WEB_SPECIFIC
    ItemList:=StringReplace(ItemList,'</span></div>','',True,True,False);            //WEB_SPECIFIC         
            LogMessage('           Parse results List Composers:'+ItemList+'||');
            curPos:=1;                                                                 //WEB_SPECIFIC
            endPos:=PosFrom(', ',ItemList,curPos);                                    //WEB_SPECIFIC
            if 0=endPos then ItemValue:=Copy(ItemList,curPos,1+Length(ItemList)-curPos);
            While 0<endPos do begin
               ItemValue:=Copy(ItemList,curPos,endPos-curPos);
               AddMoviePerson(ItemValue,'','','',ctComposers);
               LogMessage('      Get results Composers:'+ItemValue+'||');
               curPos:=endPos+Length(', ');                                           //WEB_SPECIFIC
               endPos:=PosFrom(', ',ItemList,curPos);                                 //WEB_SPECIFIC
               if 0=endPos then ItemValue:=Copy(ItemList,curPos,1+Length(ItemList)-curPos);
            end;
            AddMoviePerson(ItemValue,'','','',ctComposers);
            LogMessage('      Get results Composers:'+ItemValue+'||');
          end;
.
.
.
      //Get ~studio~ (several values in a comma separated list)
      curPos:=Pos('<dt>Productora</dt>',HTML);                                  //WEB_SPECIFIC
      if 0<curPos then begin
         curPos:=curPos+Length('<dt>Productora</dt>');                          //WEB_SPECIFIC
         curPos:=PosFrom('<dd>',HTML,curPos)+Length('<dd>');                    //WEB_SPECIFIC
         endPos:=PosFrom('</dd>',HTML,curPos);                                  //WEB_SPECIFIC
         ItemList:=Copy(HTML,curPos,endPos-curPos);
         ItemList:=StringReplace(ItemList,';',',',True,True,False);             //WEB_SPECIFIC. For Conuntry coproductions.
         ItemList:=StringReplace(ItemList,' /',',',True,True,False);            //WEB_SPECIFIC
         ItemList:=StringReplace(ItemList,'<div class="credits"><span>','',True,True,False);            //WEB_SPECIFIC
ItemList:=StringReplace(ItemList,'</span></div>','',True,True,False);            //WEB_SPECIFIC
         AddFieldValueXML('studio',ItemList);
         LogMessage('      Get results studio:'+ItemList+'||');
      end;

As well as the situation in the version of the script, and otherwise it is wrong
Code: [Select]
//Script data
  SCRIPT_VERSION  = '0.2.1.3';
and this is correct
Code: [Select]
//Script data
  SCRIPT_VERSION  = '0.2.1.4';


I fixed the Description code because the script writer did not follow my correction in the previous version of the script.

Description doesn't work fine if it is empty.

Yes, I am aware of this problem, unfortunately, it is currently I can not fix.

Yeah, now I managed to fix it. Now it should work properly.

Check the attached script.

Old code
Code: [Select]
      //Get ~description~
      curPos:=Pos('<dt>Sinopsis</dt>',HTML)+Length('<dt>Sinopsis</dt>');                                  //WEB_SPECIFIC
      curPos:=PosFrom('<dd itemprop="description">',HTML,curPos)+Length('<dd itemprop="description">');   //WEB_SPECIFIC
      endPos:=PosFrom('</dd>',HTML,curPos);                                                               //WEB_SPECIFIC
      ItemValue:=Copy(HTML,curPos,endPos-curPos);       
      ItemValue:=StringReplace(ItemValue,'(FILMAFFINITY)','',True,True,False);                            //WEB_SPECIFIC
      ItemValue:=RemoveTags(ItemValue,False);
      AddFieldValueXML('description',ItemValue);
      LogMessage('      Get result description:'+ItemValue+'||');     

New code
Code: [Select]
      //Get ~description~
      curPos:=Pos('<dt>Sinopsis</dt>',HTML);                                  //WEB_SPECIFIC
      if 0<curPos then begin
         curPos:=curPos+Length('<dt>Sinopsis</dt>');                          //WEB_SPECIFIC
      curPos:=PosFrom('<dd itemprop="description">',HTML,curPos)+Length('<dd itemprop="description">');   //WEB_SPECIFIC
      endPos:=PosFrom('</dl>',HTML,curPos);                                                               //WEB_SPECIFIC
      ItemValue:=Copy(HTML,curPos,endPos-curPos);       
      ItemValue:=StringReplace(ItemValue,'(FILMAFFINITY)','',True,True,False);                            //WEB_SPECIFIC
      ItemValue:=RemoveTags(ItemValue,False);
      AddFieldValueXML('description',ItemValue);
      LogMessage('      Get result description:'+ItemValue+'||');
      end;

Check the attached script.
« Last Edit: May 30, 2016, 05:38:42 pm by Ivek23 »
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline jippo

  • User
  • ***
  • Posts: 31
    • View Profile
Re: Script: FilmAffinity [ES] (Easy Script)
« Reply #45 on: May 29, 2016, 07:57:36 pm »
Problems with composer.

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2740
    • View Profile
Re: Script: FilmAffinity [ES] (Easy Script)
« Reply #46 on: May 30, 2016, 03:43:54 pm »
Problems with composer.

I fixed the problems.

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


Offline jippo

  • User
  • ***
  • Posts: 31
    • View Profile
Re: Script: FilmAffinity [ES] (Easy Script)
« Reply #47 on: June 10, 2016, 06:55:59 pm »
The script doesnt work me.

Filmaffinity changes his search.

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2740
    • View Profile
Re: Script: FilmAffinity [ES] (Easy Script)
« Reply #48 on: June 11, 2016, 05:35:34 am »
The script doesnt work me.

Filmaffinity changes his search.

On the link below please report the error.

Contact Web: http://contactbyweb.com/vvv-easy
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline VVV_Easy_Programing

  • Older Power User
  • *****
  • Posts: 199
    • View Profile
Re: Script: FilmAffinity [ES] (Easy Script)
« Reply #49 on: July 06, 2016, 07:27:09 pm »
Sorry  :'(, I had not seen so many emails (I added in the script the link of a contact Web for quick alert)
Thank very much, Ivek23 for maintaining the program  ;D.

I have consolidated the Ivek23 version and fix the search new API

CHANGE LOG (06/06/2016):
            V 0.2.1.6   VVV: Adjust WEB_SPECIFIC to new API (Problems with search with several results).
            V 0.2.1.5   Ivek23: Adjust WEB_SPECIFIC to new API (Problems with composer).
Attached the new version.

FilmAffinity_New_Releases.psf
Need: Search in FilmAffinity DVD rental films the movies with a rating higher of 6 and number of votes greater than 2000.
Problem to solve: Select from a web list and then gets information (for instance, number of votes) of those movies.
Characteristics of Script: A script of multiple passes. Search the list page (stored in the first access) and while the list is parsed, gets the pages from the good movies to get more information (searches similar to "FilmAffinity_[ES]"). All is saved to a file. If GET_ONLY_NOT_PVdB = True, gets only the movies not present in PVdB (but PVdb_CSVDB_FILE is needed). Although not very smart, use global variables for better understanding.

Attached the new version too.

(Edito: New versions down)
« Last Edit: September 17, 2016, 09:55:47 pm by VVV_Easy_Programing »

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2740
    • View Profile
Re: Script: FilmAffinity [ES] (Easy Script)
« Reply #50 on: July 07, 2016, 05:42:31 am »
Thank very much, Ivek23 for maintaining the program  ;D.

Welcome and thanks for the new version.

I have consolidated the Ivek23 version and fix the search new API

CHANGE LOG (06/06/2016):
            V 0.2.1.6   VVV: Adjust WEB_SPECIFIC to new API (Problems with search with several results).
            V 0.2.1.5   Ivek23: Adjust WEB_SPECIFIC to new API (Problems with composer).
Attached the new version.

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


Offline VVV_Easy_Programing

  • Older Power User
  • *****
  • Posts: 199
    • View Profile
Re: Script: FilmAffinity [ES] (Easy Script)
« Reply #51 on: September 17, 2016, 09:54:17 pm »
Update:

CHANGE LOG (17/09/2016):
            V 0.2.1.7   VVV: Adjust WEB_SPECIFIC to new API (Problems with search with several results: Choice of order, No poster).
Attached the new version.

(Edito: New versions down)
« Last Edit: September 25, 2016, 09:41:17 pm by VVV_Easy_Programing »

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2740
    • View Profile
Re: Script: FilmAffinity [ES] (Easy Script)
« Reply #52 on: September 18, 2016, 09:40:42 am »
Update:

CHANGE LOG (17/09/2016):
            V 0.2.1.7   VVV: Adjust WEB_SPECIFIC to new API (Problems with search with several results: Choice of order, No poster).
Attached the new version.

Thanks for the new version.
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline jippo

  • User
  • ***
  • Posts: 31
    • View Profile
Re: Script: FilmAffinity [ES] (Easy Script)
« Reply #53 on: September 24, 2016, 06:38:22 pm »
This script needs an update.

Offline VVV_Easy_Programing

  • Older Power User
  • *****
  • Posts: 199
    • View Profile
Re: Script: FilmAffinity [ES] (Easy Script)
« Reply #54 on: September 25, 2016, 09:40:43 pm »
Update:

CHANGE LOG (25/09/2016):
            V 1.1.0.0   VVV: Use the RemoveTags function for scrap. New "CleanBeginEndSpaces" user function.
 Attached the new version.

Thanks  jippo (jdr___@hotmail.com) by the alert.

(Edito: New versions down)
« Last Edit: October 20, 2016, 08:10:05 pm by VVV_Easy_Programing »

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2740
    • View Profile
Re: Script: FilmAffinity [ES] (Easy Script)
« Reply #55 on: September 29, 2016, 06:10:44 am »
Update:

CHANGE LOG (25/09/2016):
            V 1.1.0.0   VVV: Use the RemoveTags function for scrap. New "CleanBeginEndSpaces" user function.
 Attached the new version.

Thanks  jippo (jdr___@hotmail.com) by the alert.

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


Offline VVV_Easy_Programing

  • Older Power User
  • *****
  • Posts: 199
    • View Profile
Re: Script: FilmAffinity [ES] (Easy Script)
« Reply #56 on: October 20, 2016, 08:12:43 pm »
Update:

CHANGE LOG (20/10/2016):
            V 1.2.0.0   VVV: Clean code with TextBetWeen (RemoveTags not needed) and ExplodeString functions. Use of TWideArray variable type.
                             Use 'Trim' PDV funtion in place of "CleanBeginEndSpaces" user function. 

Attached the new version.

(Edito: New versions down)
« Last Edit: October 29, 2016, 05:41:23 pm by VVV_Easy_Programing »

Offline jippo

  • User
  • ***
  • Posts: 31
    • View Profile
Re: Script: FilmAffinity [ES] (Easy Script)
« Reply #57 on: October 29, 2016, 11:54:19 am »
The script doesn't work.

It doesn't import nothing.

Offline VVV_Easy_Programing

  • Older Power User
  • *****
  • Posts: 199
    • View Profile
Re: Script: FilmAffinity [ES] (Easy Script)
« Reply #58 on: October 29, 2016, 05:43:29 pm »
Update:

CHANGE LOG (29/10/2016):
            V 1.3.0.0   VVV: Managed redirected film pages in search mode. Added search stored URL (if present) in 'GetDownloadURL' function.
Attached the new version.

Thanks  jippo (jdr___@hotmail.com) for the alert.

(Edito: New versions down)
« Last Edit: November 12, 2016, 07:05:43 pm by VVV_Easy_Programing »

Offline Am-rA

  • Member
  • *
  • Posts: 19
    • View Profile
Re: Script: FilmAffinity [ES] (Easy Script)
« Reply #59 on: November 01, 2016, 10:48:41 pm »
 :-* tnks