Skip to content

FectourSu/KinopoiskParser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kinopoisk.ru parser by movie id on Python :shipit:

Table of Contents

Getting Started

To get started using application follow the instructions below. This project was written on python 3.9, but it was also tested on version 3.7

Installing packages:

pip install beautifulsoup4 
pip install aiohttp
pip install logging
pip install argparse
pip install fake-useragent
pip install webdriver-manager
pip install lxml 
pip install configparser 
pip install selenium
pip install pyinstaller #if you want compile to exe

Quick Start Guide

Launching the application is as simple as possible:
python [nameofscript] [filmid]

python main.py -kp 389

After parsing, the result will be placed in the created src folder In the "src" folder, you can find ready-made parsed movies in .json format

If you wants

To compile the application, use the PyInstall package connected above

python -m PyInstall --onefile kinopoisk.py

in the dist folder you can find the compiled version of the program

Settings

The main parsing settings will be described here If you have registered on https://kinopoiskapiunofficial.tech/ and got your own api, in this case, you can have your api in settings.ini

[GENERAL]
api = <YOUR API>

UPD: The api from the test account was used in the repository

Final recommendations

The parser is built on using the xpath element, that is, there should be no binding to the class name of the object. But... the author is a trash coder... And therefore, the parser uses partially class name blocks, it is required to update it in settings.ini, as their developers change on the site

For example

At the moment, the class of the main page is as follows: styles_root__2gHIX in the settings, the last part of it is taken

[PARSER]
page = __2gHIX # you need to change it as the styles are updated

Have a nice parsing / Приятного парсинга :trollface:

About

Attempt to parse the kinopoisk.ru by movie id

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages