Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - VVV_Easy_Programing

Pages: 1 2 3 4 5 6 [7] 8 9 10
121
Scripts and Templates / Re: Script: FilmAffinity [ES] (Easy Script)
« on: June 14, 2017, 09:21:28 pm »
Update:
CHANGE LOG :
            V 2.0.0.1 (14/06/2017) VVV: Fixed bug with UTF-8 conversion. Now the function "DownloadPage" with curl works faster.

Attached the new version.


Thank you for the alert, Am-rA  :)

(Edito: New versions down)

122
CHANGE LOG :
            V 0.2.0.6 (12/06/2017)  VVV:Fixed bug with the order of the search mode.

Attached the new versión.

(Edito: New version down)

123
Support / Re: What is the best importing script?
« on: June 12, 2017, 03:20:59 pm »

1º) I use IMDB plugin for the first detection download, overall in order to get the "t...." IMDB identification (TheMovieDB can find the movie with this code).
2º) After I use "FilmAffinity_[ES][HTTPS]" script for download nearly all information in Spanish. Because is a proprietary database, the available information are very solid.
http://www.videodb.info/forum_en/index.php/topic,3876.msg20113.html#msg20113
3º) After I use "TheMovieDB_[ES]" script for download some bizarre information (for instance, the collection, the fanart, etc).
http://www.videodb.info/forum_en/index.php/topic,3881.msg19414.html#msg19414
4º) For download the people information (photo) I use "TheMovieDB People [ES]" script
http://www.videodb.info/forum_en/index.php/topic,4086.msg20004.html#msg20004
5º) And more, I use PVdB for generate the NFO file of the movie for KODI (so I don't need scrap the info in KODI, very much less comfortable).
http://www.videodb.info/forum_en/index.php/topic,1496.msg20070.html#msg20070

The great advantage of TheMovieDB is a free web database and with a know information format but you have the information that you have in your language. Some free programs, for instance FileBot, use only this database.
The script are for download in Spanish language but are easy to adapt it to other language (TheMovieDB_[ES] have some interior parameters for easily do that) but your avatar, Miguel, tells me something.

124
Update:
CHANGE LOG :
V 2.0.0.0 (24/05/2017) VVV: HTTPS adaptation: Now GET PVdB function don't donwload the page.For do that it use curl free program https://curl.haxx.se.
               Change a  "filmaffinity.com/es/advsearch" instead of "filmaffinity.com/es/search" in order to avoid the auto redirection when only one movie are posible
               Fixed "Productor" or "Producer" present in some studio fields.
               User Options added: CHECK_WEBSITE = Set to True add to SearchResult List the true HTTPS links 'Just to check the website'.
                                              SEARCH_ENGINE = Set to True, if there isn't FilmAffinity search results, try with Bing search engine.

Attached the new version.

(Edito: New versions down)

125
FilmAffinity_[ES][HTTPS] is  here.

To adapt PVdB for downloading https pages you Needed external:
1) Download the curl-7.54.0-win32-mingw.7z file from https://bintray.com/artifact/download/vszakats/generic/curl-7.54.0-win32-mingw.7z  (Thanks Viktor Szakáts).
2)Extract the three curl libraries files and copy them to script folder:
• curl-7.54.0-win32-mingw\bin\curl.exe
• curl-7.54.0-win32-mingw\bin\curl-ca-bundle.crt
• curl-7.54.0-win32-mingw\bin\libcurl.dll

(You can see curl - PVD to https solution for more information)

126
Scripts and Templates / Re: Script: FilmAffinity [ES] (Easy Script)
« on: May 24, 2017, 08:26:59 pm »
Well, I think this is a "Chronicle of a Death Foretold".
Fortunately, I'd tested the curl solution with Rottentomatoes_ [HTTPS] script.
I must search a time to adapt it, not too later because I use it.
Stay tuned.

127
Scripts and Templates / Re: Export to XBMC
« on: May 21, 2017, 07:59:55 pm »
It seems that you have done all right so we must test where its the fault.
1) See if you have the folder and the templates as the capture screen 1.
2) See if you use one of the three templates export like the capture screen 2 (the other two are the same)
3) Test that the stored folder in PVD for every films is good and you have the rights for write in it (the nfo and jpg's are saved in the film folder by the template).
4) I use some custom fields: <!-- Custom PVD Fields necesaries 'Set' 'IMDB_Votes' 'Top_250' 'FilmAffinity_Votes' --> if you don't use this fields, erase the lines with this lines:
For instance for the template "KODI NFO_Files Easy.ptm" delete lines:
For 'Set': lines 48 and 49=
      <!-- The Set PVD custom field contains film collection or saga -->
      <set>{%value=Set custom="true"}</set>
For 'IMDB_Votes': line 21=
       <votes>{%value=IMDB_Votes custom="true"}</votes>
For 'Top_250': line 29
       <top250>{%value=Top_250 custom="true"}</top250>
For 'FilmAffinity_Votes': line 25=
       <votes>{%value=FilmAffinity_Votes custom="true"}</votes>
   Note: If you don't use two ratings better delete lines 23,24,25 and 26=
        <rating name="FilmAffinity" max="10">
            <value>{#StringReplace '{%value=orating}' ',' '.'}</value>
            <votes>{%value=FilmAffinity_Votes custom="true"}</votes>
        </rating>

I think that the custom fields may be the principal problem.
I use regularly the templates and they works fine and Kodi catch the information well.
Let me know if you can solve the problem.


128
Scripts and Templates / Re: Export to XBMC
« on: March 19, 2017, 10:49:12 am »
New version for Kodi 17.0-Kripton: It allows several ratings. Although is made for IMDB and FilmAffinity is easy to adapt to your own ratings.

You have three templates: Only NFO, NFO+fanart.jpg, NFO+folder.jpg (movie poster).
If you have PVD with all this information, you must applies the three and so in Kodi you will not need to scrap, only to read the nfo files.

129
Scripts and Templates / Some usefull SQL scripts in PVD
« on: January 28, 2017, 08:10:45 pm »
Hello,
there are sometimes that the script is not a good tool for arrange PVD. Happily we have the possibility of use SQL scripts.

First you must start  PVD in Debug Mode (viddb.exe -debug) and then you have in Menu->Help->SQL where you can run a SQL Script (tick the box if the script have several lines).

I publish two examples easy to understand:
1) Now I have problems with IMDB[EN] and the original title (give me a false string 'var ....'). I can solve easily the problem running:
                  update MOVIES set "origtitle"="title" where "origtitle"='var ue_t0=window.ue_t0||+new Date();';
or
                  update MOVIES set "origtitle"="title" where SUBSTR("origtitle",1,3) = 'var';

2) Some strange chars appears in the people IMDB url. I use:
                  update PEOPLE set "url"=replace("url",'?ref_=tt_ov_dr', '/');
                  update PEOPLE set "url"=replace("url",'?ref_=tt_ov_wr', '/');

I anime to all to publish here their own SQL scripts for PVD.

130
Talk / Re: Donations to Ivek
« on: January 20, 2017, 10:03:37 pm »
Welcome again, Ivek.
It true that the forum is a little bit empty without you but don't worry ...  we know how to wait.

 :) I wish you the best for your health eyes and if you need rest your eyes don't hesitate and do it. It's the first priority  :)

131
Scripts and Templates / Re: Export to XBMC
« on: January 20, 2017, 09:22:39 pm »
New version that pass artist thumb url to KODI if you have the URL in the translate name (see http://www.videodb.info/forum_en/index.php/topic,4086.0.html#new ).
You have three templates: Only NFO, NFO+fanart.jpg, NFO+folder.jpg (movie poster).

132
Hello,
it's really difficult to find scripts for retrieve information for people.
Well, I make a little one which get the basic info (photo included) in Spanish (but easy to adapt for English or French, see down) from TheMovieDB.
It has an important feature: Store the URL of the person photo in ~transname~ for send to KODI in a Template (see in the forum)..

---------------------------------------------
SCRIPT:     TheMovieDB_[ES]_People
API URL:    http://docs.themoviedb.apiary.io/
CO-AUTHORS: VVV
Contact Web: http://contactbyweb.com/vvv-easy
---------------------------------------------
CHANGE LOG (15/01/2017):
            v 0.1.0.0   VVV: initial release
---------------------------------------------
FIELD USE:
  This is a script designed to be easy to understand and to adapt. For this reason may be missing some fields and
  the programming may not be smart. It's a only "One Pass" Script and get data in API SEQUENTIAL ORDER.
  The Personal Video DataBase field names in comments are enclosed in "~" so they are easier to find in the script.
  The WEB_SPECIFIC commentary points out the specific text for Web fields.
  Use Log PVdB debug Window for looking search errors.
  (Due a PVdB "GET" scripts funtions seems doesn't work with 'https' URL de v.0.2.0.0 works with API web dialog.
   See 'TheMovieDB_[ES]' script for no API (take information direct from web page) scraper.)
  If desired (PHOTO_URL_IN_TRANSNAME=True), it use the Field ~transname~ for storing the URL to the person photo, for send to KODI in a Template.   
KNOWN ISSUES:
  1. For compiling cuestions functions must be defined in the script before use (not in order of execution).
  2. For the search texts for locating the fields in Web page Null '' value it's not valid. You must replaces all
     escaped HTML characters (like &lt;&gt;&amp;&quot;) with normal characters (like <, >,$, ").
  3. It's a only "One Pass" Script: It DOES NOT makes several calls to the main program to scrape information from various pages of
     the movie in the same site. It only do that for searching mode in a movie list results.
  4. It has a Rondabout in BASE_URL (BASE_URL_TRUE,BASE_URL_RONDABOUT) for "cheat" GET PVdB funtion and rondabout the "https" fail.
  5. Get the ~orating~ (Popularity). It's not documented in PVB Scripting Manual and in the script don't work even working in the skin.
  5. In People database, PVdB don't download automaticaly the photo like in Movie database but using ListSearch it do.
     Set PHOTO_DWN_RONDABOUT  = True to activate the the ImageListSearch as RONDABOUT for download Photos. Because there is not choice (because its
     only one photo) normaly it download without asking but if PVdB begin to ask then with PVdB preference/Plugin/Silent Enable would be
     more confortable for large databases.
---------------------------------------------
//User Options
  BYPASS_SILENT        = False; //Set to True to ensure ShowMessage alerts (then bypass Silent PVdB preferences)
  PHOTO_DWN_RONDABOUT  = True;  (*Set to True to activate the the ImageListSearch as RONDABOUT for download Photos.
                                  Because there is not choice (because its only one photo) normaly it download without asking but if PVdB begin to ask then
                                  with PVdB preference/Plugin/Silent Enable would be more confortable for large databases.*)
  PHOTO_URL_IN_TRANSNAME = True; //Set to False to disable to avoid use the Field ~transname~ for storing the URL to the person photo, for send to KODI in a Template.

  LANG_API_STR         = '&language=es';                                  //WEB_SPECIFIC
  //LANG_API_STR       = '&language=en';                                  //WEB_SPECIFIC
  //LANG_API_STR       = '&language=fr';                                  //WEB_SPECIFIC

(Edito: New version down)

133
Development / Re: curl - PVD to https solution
« on: November 30, 2016, 10:07:11 pm »
Well, I don't know very much over proxy but curl has a lot of options over proxy:

Quote
PROXY
 curl supports both HTTP and SOCKS proxy servers, with optional authentication. It does not have special support for FTP proxy servers since there are no standards for those, but it can still be made to work with many of them. You can also use both HTTP and SOCKS proxies to transfer files to and from FTP servers.

You can try to make your own adaptation with the curl proxy parameters (¿--proxy?) listed in:
https://curl.haxx.se/docs/manpage.html

More info in:
https://curl.haxx.se/docs/manual.html

134
Talk / Re: curl - solution for https
« on: November 26, 2016, 11:14:31 am »
VERSION:    0.3.3.0 (23/11/2016) -> VVV: Added Advanced Search with Bing (http search engine) and some code improvements.

Preview poster in search list is disable with // because give me problems

Quote for Ivek23: But with those three movies the RT search work for me. I had must try the bing search with a roundabout (not present in the attach script) so test it in real conditions.

135
Talk / Re: curl - solution for https
« on: November 17, 2016, 08:03:11 pm »
It's a good idea to include a Bing search in the script for advanced search but I had tried and this is a very rare case.
A lot of films are found with the script in normal search ¿can you write me the name of the film that needs advanced search?

I think that must be another problem ¿the title of your films are in english?
In the search the script use 'title' in place of traditional 'origtitle', you can change it in the code:
Quote
end else begin  //The movie URL not exist, search mode needed. Downloand the search page. 
          DownloadURL:=StringReplace(SEARCH_STR_TRUE,'%s',GetFieldValueXML('title'),True,True,False);DownloadURL:=StringReplace(SEARCH_STR_TRUE,'%s',GetFieldValueXML('title'),True,True,False);


In other side, I put a double security in the script for need advanced search:
Quote
        if (0=Pos('Search Results - Rotten Tomatoes', HTML)) or (0<Pos('Sorry, no results found', HTML)) then begin      //WEB_SPECIFIC
          ShowMessage('Not results. Try again or make an advanced search out of the script.'+Chr(13)+'Write the movie URL (http) in the PVdB manually (remember separated by spaces) and run again.','Rotten Tomatoes Search Results');
 
If you have problems with easy films (for instance: godfather) you can delete '(0=Pos('Search Results - Rotten Tomatoes', HTML)) or' in order to try to reduce the false alerts.

I promise you integrate the bing search in the script but I don't have to much time now. I propose you that you finish Rottentomatoes_ [HTTPS] script and I continue the script adding the Bing search.

136
Scripts and Templates / Re: Script: FilmAffinity [ES] (Easy Script)
« on: November 13, 2016, 07:29:14 pm »
Update:

CHANGE LOG :
            V 1.3.1.1 (12/10/2016) VVV: Added clean ~Writers~ of 'cómic:' and 'libro:'. Separated the '(' ')' elimination for get all cases.

Attached the new version.


(Edito: New versions down)

137
Scripts and Templates / Re: Script: FilmAffinity [ES] (Easy Script)
« on: November 12, 2016, 07:03:53 pm »
Update:

V 1.3.1.0 (12/10/2016) VVV: Clean ~Director~ '(creator)', ~Writers~ '(artículo:)''(historia:)''(libros:)''(novela:)''(novelas:)''(obra:)' and ~Composers~ '(canción:)''(canciones:)''(tema:)''(aka)'

Attached the new version.

(Edito: New versions down)

138
Talk / Re: curl - solution for https
« on: November 09, 2016, 04:48:31 pm »
 :D ;D :D ;D :D ;D

If you arrive, in this script or in other, to need download pictures from a HTTPS link (so binary download), tell me because I think that it will be necessary make some code.

139
Talk / Re: curl - solution for https
« on: November 08, 2016, 07:52:31 pm »
I made and attach the next version:
VERSION:    0.3.1.0 (06/11/2016) -> VVV: Use quotation marks for the paths.

but I see some things bizarre in you log file:
Quote
(8.11.2016 8:46:09) PVD Version: 0.9.9.21
¿why you don't use the latest version 1.0.2.7?

Quote
(8.11.2016 8:46:37) UpdateToolbar: 4
(8.11.2016 8:46:45) GET: http://www.videodb.info/upload/check.php
(8.11.2016 8:46:47) Update error: Socket Error # 10061
Connection refused.
(8.11.2016 8:46:52) UpdateToolbar: 5
It seems that your copy of PVdB have problems even with the http pages ¿are you sure that you haven't a proxy, firewall or antivirus with your PVdB? It's very rare that curl works out of PVdB and not in ¿are you sure that Proxomitron is not active?.

¿Can you test it in a clean downloaded 1.0.2.7 version? You can use a portable one decompressing:
http://www.videodb.info/bin/pvd1.zip
in C:\Users\Ivo\Documents\PersonalVideoDB\ and adding the three needed curl files.
Perhaps other people can help us trying the script.

BTW:
The biggest solved of script is synchronize PVdB and the curl download and be sure when you parse that 'downpage.htm' is fresh and completed. So I do two steeps:
1) First the script delete the saved 'downpage.htm'.
Quote
    //Delete the ancient dowloaded page file. Needed for wait to curl download.       
    While FileExists(ScriptPath+BASE_DOWNLOAD_FILE) do begin
         FileExecute('cmd.exe', '/C del '+ScriptPath+BASE_DOWNLOAD_FILE);
         LogMessage('      Waiting 1s for delete:'+ScriptPath+BASE_DOWNLOAD_FILE);
         wait (1000);
    end;
2) After curl call it waits to detected the  'downpage.htm'
Quote
    //Wait curl finish and exist the downloaded page
    While Not(FileExists(ScriptPath+BASE_DOWNLOAD_FILE)) do begin
         LogMessage('      Waiting 2s for exists of:'+ScriptPath+BASE_DOWNLOAD_FILE);
         wait (2000);
    end;
So in your first log, the script has problems to delete 'downpage.htm', it tries and wait, tries and wait:
Quote
(8.11.2016 8:47:03)       Waiting 1s for delete:C:\Program Files\Personal Video Database\Scripts\downpage.htm
(8.11.2016 8:47:04)       Waiting 1s for delete:C:\Program Files\Personal Video Database\Scripts\downpage.htm
(8.11.2016 8:47:05)       Waiting 1s for delete:C:\Program Files\Personal Video Database\Scripts\downpage.htm
When you block this part of code it detects that something goes wrong:
Quote
(8.11.2016 8:54:58) Global Var-ScriptPath|C:\Program Files\Personal Video Database\Scripts\|
(8.11.2016 8:54:58)       Some error deleting: C:\Program Files\Personal Video Database\Scripts\downpage.htm


 

140
Talk / Re: curl - solution for https
« on: November 08, 2016, 01:23:32 pm »
I think that the problem it that you program path have spaces and the 'del' command don't be able to erase 'downpage.htm' (it tries, wait 1 seg and tries, tries ...)
Perhaps curl may the same problem.

This afternoon I shall try something with inverted commas but ¿may you do a try with a copy of PVdB in a folder without spaces, for instance: C:\Users\Ivo\Documents\PersonalVideoDB\?

Pages: 1 2 3 4 5 6 [7] 8 9 10
anything