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
81
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.


82
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.

83
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.

84
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  :)

85
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).

86
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)

87
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

88
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.

89
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.

90
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)

91
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)

92
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.

93
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


 

94
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\?

95
Talk / Re: curl - solution for https
« on: November 06, 2016, 08:34:08 pm »
Attach you have a functional version:
VERSION:    0.3.0.0 (06/11/2016) -> VVV: Rebuild full script.

It retrieve the principal infos (you could complete the rest, I left hints in the code).
I don't now all the custom fields. I retrieved some ratings but I left hints and questions in the code.
Not poster or screenshot (if you have the https link I could retrieve it with curl and charge in PVdB by file but it's not easy to find in the page).

I see that RT is a slowly page, don't worry if the DOS windows stops a 5 or 6 seconds when you run in PVdB, the script waits (this was a big problem. now is solved).

Quote
How to edit or connect now all files from curl_try to Rottentomatoes_ [HTTPS] in one executable file.
The script works directly in PVdB without need get out to DOS (curl_try was only a check).

To spread in internet, the best form to save the 4 needed files:
              Scripts/Rottentomatoes_[HTTPS].psf,
              Scripts/curl-ca-bundle.crt,
              Scripts/curl.exe,
              Scripts/libcurl.dll
is compressed in a zip file but the length is out of the limit of the forum. Now, the script checks that all files are present.

If you want to download the original ones: https://bintray.com/artifact/download/vszakats/generic/curl-7.50.2-win32-mingw.7z (The needed files were in "curl-7.50.2-win32-mingw\bin\" folder)

Quote
Will now required for each movie in curl_try file manually enter the URL address of the movie, which is of course more movies lengthy work, or it will be automatically regulated.
Now the script have a automatical full search, but it must save in the 'http' (not S) base url. For back compatibility and for prevents PVdB crash. Do the same if you write it manually.

Finally, it's not difficult to adapt this script to another HTTPS page. All people are free to use it.

96
Talk / Re: curl - solution for https
« on: November 05, 2016, 12:19:57 pm »
Good news.
I must ask you some questions.
¿Do you want make a complete script or only one for your custom fields?
If complete: ¿Do you want that I help you with the script? ¿May I you propose some improvements?
1) I attach: 0.2.0.3 (05/11/2016) -> VVV: Some improvements and explanations in code. without touch the code
2) For touching the code:
    I see that the structure is a little bit confusing ¿do you want that I arrange it?
    I see that the script use AddFieldValue that is deprecated. It better AddFieldValueXML ¿do you want that I arrange it?
    I think that the ParseSearchResults don't work ¿do you want that I programme it?

I don't maintain another script but I can help you.

97
Talk / Re: curl - solution for https
« on: November 04, 2016, 09:38:33 pm »
Don't worry, all used and created files (downpage.htm) must be in the PVdB Scripts folder.
We must do two tries.
1) Use the new script. It automatically detects the scripts folder were must be the Rottentomatoes_[HTTPS].psf and the three curl files. Send to the forum the Log windows with the http://www.rottentomatoes.com/m/godfather try PVdB movie (don't worry if it don't scrapt the information).
2) Decompress the curl_try.zip in the script folder (ever with the three curl files), run curl_try.bat it in DOS windows and copy the DOS text result to the forum.

When we resolves the curl issue we can begin with the scrap information work.

98
Talk / Re: curl - solution for https
« on: November 03, 2016, 08:46:05 pm »
Bad news.
 I don't see an special authorization for curl in my windows firewall.
         My firewall is windows  ¿Do you have a firewall different that windows standard?
         I have Firefox installed ¿Do you have it?
         My antivirus is avast ¿do you have a especial antivirus?
         ¿What it is the content of your downloaded file? ¿Some like this or nothing at all?
                 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
                 <html><head>
                <title>403 Forbidden</title>

¿Can you try this commands in DOS Windows in the script folder?

1)Download a httpS in file not silent
curl.exe -o downpage_try.htm https://www.rottentomatoes.com/m/godfather

I get the page and curl shows
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  222k  100  222k    0     0  87034      0  0:00:02  0:00:02 --:--:-- 87034


2)Download a http in file not silent
curl.exe -o downpage_try.htm http://www.imdb.com/title/tt0068646/?ref_=fn_al_tt_7

I get the page and curl shows
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  197k    0  197k    0     0   214k      0 --:--:-- --:--:-- --:--:--  214k


3)Download a http in file not silent with identificated agent:
curl -A "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" -o downpage_try.htm http://www.filmaffinity.com/es/film809297.html

I get the page and curl shows
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Curren
                                 Dload  Upload   Total   Spent    Left  Speed
100 48198    0 48198    0     0   336k      0 --:--:-- --:--:-- --:--:--  336k



4)If it fail try (verbose, for know if curl says something):
curl.exe -v -o downpage_try.htm http://www.imdb.com/title/tt0068646/?ref_=fn_al_tt_7



99
Talk / Re: curl - solution for https
« on: November 02, 2016, 07:30:51 pm »
Well, nobody say it was be easy. We can begin the "debug":
1) ¿Do you have this (Script_Folder.jpg) in your PVdB Scripts Folder?





2) ¿Do you change
      PVdB_SCRIPTS_PATH_FOLDER   = 'C:\Users\Public\Portables\PersonalVideoDB\Scripts\'//The PVdB scripts path folder
to your own script folder (don't forget the last '\')
3) Try with an movie example with his BASE_URL not httpS (Capture2.jpg)




and Import with Rottentomatoes_[HTTPS].psf in debug mode. ¿can you see in the Log Windows, something like this (LogWindow.jpg)?





If not ¿can you attach your Log window?

100
Talk / Re: curl - solution for https
« on: November 01, 2016, 09:57:26 pm »

Rename the attach as Script.002.zip -> Scripts.zip.002. Decompress the first with 7zip. It call to the second automatically.


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