📜 ⬆️ ⬇️

Parsim Lostfilm.tv RSS or Another bike

Not so long ago, “Lostfilm” moved to https. In this regard, flexget began to produce a wonderful error when trying to download a torrent file:

RequestException hostname 'www.lostfilm.tv' doesn't match either of 'ssl2000.cloudflare.com', 'cloudflare.com', '*.cloudflare.com' 

The search on the Internet did not give out anything intelligibly, or all the data was 1-2 years old, and the smoking of the Lostfilm forum did not bring any results either. Therefore, there was an idea to write another bike.

Actually, all the sources here .

Everything was done for ubuntu, but in the development process it worked perfectly on macos
')
Required packages:


Settings made in a separate config:

 send_email: False #  email    - use_transmission: False # -  transmission   store_torrent_files: False # -       transmission: # transmission address: localhost port: 9091 user: admin password: admin email: #  email,   google from: ***** to: ***** subject: New torrents from Lostfilm smtp_host: smtp.gmail.com smtp_port: 587 smtp_username: **** smtp_password: **** smtp_tls: yes lostfilm: feed: http://www.lostfilm.tv/rssdd.xml cookie: " uid=****; pass=****; usess=****" # ,     ,    user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:34.0) Gecko/20100101 Firefox/34.0 #      downloads-path: /path/to/downloads/dir/ #  ,  use_transmission torrents-path: /path/to/torrents/dir/ #  -,  store_torrent_files series: #  720p: - Bitten: path: Serials 1080p: - Cougar Town: alternate_name: ' ' MP4: - Grimm - Stargate Atlantis 

About setting up serials in more detail.

Yes, I copied some parts from flexget, I see no reason to invent the format again.

As you can see from the config example, the first level is quality, and the second is the original name of the series ().

This may just be a list without additional parameters, as in MP4 - in this case, both series will be searched by original names and downloaded using transmisiion in folders with the same name.

It can also be a list with parameters. There are two additional parameters:


This allows you to create, for example, such a config (all three series are downloaded into one folder Outer space serial serials):

 series: 720p: - Stargate 1: path: Outer space serials alternate_name: 'Stargate Atlantis' - Stargate 2: path: Outer space serials alternate_name: 'Stargate Universe' - Startrek 1: path: Outer space serials alternate_name: 'Startrek: Deep Space Nine' 


The search for the series is very simple - in the line with the name of the series, occurrences are searched for by name and quality. Nobody forbids to make, for example, the quality of avi and then the parser will find all files ending in avi.

If the series was downloaded either to the folder for torrents, or successfully transmitted to the transmission, it is marked as downloaded (download.log file) and the parser will skip it next time.

Manual on launch - in the readme.

Errors fall in error.log, general progress - in process.log

The script works successfully the third day.

Faced a problem - sometimes there is nothing under the link to the torrent file, but, apparently, this is a problem from the side of Lostfilm. Each time the script starts, it will try to download this file as long as it is in the feed.

Criticism and suggestions are welcome.

Source: https://habr.com/ru/post/250429/


All Articles