
Foreword
Most recently, when
the epic with KinoPoisk began , I thought about switching to
IMDB - in terms of transferring my film ratings to it. And it is desirable that this could be done in automatic mode, because I did not want to manually add my 803 movie ratings to IMDB again.
The search for such processing brought me to the comrade page of REDNBLACK, where he put it, from his words:
A simple program imports scores and adds to your IMDB list movies from the * .xls file exported from Cinema Search.
Simple ?! For those who hears for the first time (and I think 80 percent of those at KinoPoisk), what is PHP, CURL, Composer - simple? For humor - plus karma ...
This is how the Psyber user from KinoPoisk expressed himself when I offered him to use the creation of REDNBLACK:
I, as a mere mortal, could not figure out how to use it, but I would very much like to ...
I will tell you what “simple” is: when you launch an application where there are two windows - in the left window you register a link to a profile in KinoPoisk, in the right window - to a profile in IMDB and press the “Run” button.
')
In any case, this is better than nothing, and REDNBLACK for the work done - Respect. Therefore, using, well, frankly Spartan instructions comrade, I proceeded to transfer ratings of films. That's what happened.
Training
So, first we need to prepare our data for transfer and install the missing software on the computer.
Go to your profile on KinoPoisk. Go to the tab "Ratings", click "Export to MS Excel". The list with films for transfer was downloaded, the list file itself was renamed and placed in the root of the disk: d: \ kinopoisk_N.xls

The easiest part of the procedure is performed.
According to the recommendations of REDNBLACK, now we need to install PHP. A google search immediately sent me
to the site for download.
It so happened that on the day when I was engaged in the transfer, this download link was not available, so PHP was downloaded
as part of the XAMPP package :

We launch the installation file XAMPP and from the offered list for installation, we leave only PHP.

The next step is to install Composer. Download the
installation file (direct link). We start. Composer will ask us: “where is PHP?”. We point him to the folder C: \ xampp \ php, where we have php.exe.

On IMDB
register your profile or open already registered.
Create in your profile LIST (list) where we will upload movies with ratings.
Time:

Two:

We go to the newly created list and write down its
id , which is located in the address bar of the browser - it is still useful to us. In my case, the
id looks like this:

For the transfer, we still need a profile
id . To find it, press Ctrl + Shift + I (for Chrome). Find cookies authorization string:

We first click on the line:
- two times with the left mouse button, then
- once the right mouse button and select "Copy."
Write the
id to a text file for further processing.
Transfer
The fun begins.
We go to visit REDNBLACK and download its zip-archive:

Extract the archive to disk d: \

Open
Windows PowerShell and consistently enter commands, not forgetting to first change the disk:
cd d: \
This is where Composer came in handy.
And now we will collect all the collected information to the heap. We start PowerShell and form a string command with parameters to execute a PHP program. This line has the form:
php application.php " *.xls " --auth="Cookie IMDB" --list="ID " --query_format=" "
Let's sort this line - what and where to substitute:
1. "Full path to * .xls file":
d:\kinopoisk_N.xls
2. "Cookie authorization string with IMDB" (profile
id ):
BCYkmNuQatCqhAmBX7k6158N8vu_26DTpFYfITPrIznWMrpFeLZipNznKBhXGoOJqsO9VoczRALY1fdNXMkkOPhoe9lua_kHr7xZMTTf-qkHiMOXx1HDif4eYyqGPKrYH-pnnWvFtrS7oBbbN87jUCyiG1cEIWHwSVsJKsYp8q1hl7aL0XZNIqQLT8X9sUhNER0VG
3. “List (sheet) ID to add”:
ls016952709
4. "request type":
mixed
(the slowest but reliable percentage accuracy is about 90%)
Important! Do not forget to enter the text of options in "".
We fold. We get ready hodgepodge:
php application.php d:\kinopoisk_N.xls --auth="BCYkmNuQatCqhAmBX7k6158N8vu_26DTpFYfITPrIznWMrpFeLZipNznKBhXGoOJqsO9VoczRALY1fdNXMkkOPhoe9lua_kHr7xZMTTf-qkHiMOXx1HDif4eYyqGPKrYH-pnnWvFtrS7oBbbN87jUCyiG1cEIWHwSVsJKsYp8q1hl7aL0XZNIqQLT8X9sUhNER0VG" --list="ls016952709" --query_format="mixed"
Important! This line will be run from the
d: \ kinopoisk \ src folder, so the sequence of transitions and the launch of the program for execution will look like this:

By the way, if anyone knows how to get rid of the wrong encoding in PowerShell, I would appreciate advice.
We press Enter - the transfer process has gone! It remains to wait. My wait was 1 hour and 20 minutes.
findings
What do we see after the transfer process?

732 ratings (ratings) have been transferred out of 803. 71 ratings have not been transferred. My suspicions crept in that the Cyrillic spelling of the film titles was to blame. But REDNBLACK reacted to this:
Cyrillic characters perceives. Improve is no longer possible, in my opinion, this is already an ideal-possible result, with such and such poor data from KinoPoisk.
However, we were not promised a 100% result.
Conclusion
I am not an expert in PHP, so if anyone has any technical questions, you know who to contact. If anyone finds mistakes, or offers other (best) ways of transferring - share thoughts and wishes.
PS: It took me two days to transfer the ratings of films (with the study of the manual, details, samples, error detection, consultations). If my experience is useful to someone and allows those who wish, taking into account the above described manual, to spend an hour on the transfer - I will assume that I spent my time for good reason.