kblixt / movie-extra-downloader Goto Github PK
View Code? Open in Web Editor NEWDownload movie extras from Youtube.
License: MIT License
Download movie extras from Youtube.
License: MIT License
Good Morning -
Ran across your script this morning as I have many trailers I need to download which TMM3 didn't pick up. After configuration, I tested it on a couple of films and it worked great except for one thing which I can't figure out.
I'm using the example config "720p-trailer.cfg" which seemingly saves the trailer as "%(title)s.%(ext)s" within a folder named "trailers" within the movie's folder. How can I make it instead save within the same folder as the movie and with the same filename as the movie's file with the suffix "-trailer" at the end?
Example:
The folder "D:\Movies\Darkness [2002] 1080p" contains the following files:
After running the script, the folder "D:\Movies\Darkness [2002] 1080p\trailers" is added which includes the 2 new files
What I am wanting is for instead of the above, for the trailer to be saved within "D:\Movies\Darkness [2002] 1080p" alongside all other movie files as the filename:
I tried playing with the scripting a bit, but am no Python expert. I couldn't find out which variable was the movie name nor how to save it to the root path. To note, all the filenames of my movies are the same as the folder name so theoretically a variable could be used for the folder's name as well.
Any suggestions? Thank You
Is it possible to filter the search results, in the same way that it is possible through the YouTube website, to only show HD videos?
https://i.imgur.com/TzPa9ch.png
I feel this would provide better results rather than increasing the search limit which can increase the possibility of bad matches.
How am i supposed to use extra_configs ? Just past a 1080.cfg in this folder and start the script ?
I've modified required phrases from this .cfg but it seems to do nothing else than using default
I might have a configuration problem, but I believe time.clock is deprecated in Python 3.8
File "/home/home/Movie-Extra-Downloader-master/url_finders.py", line 3, in <module>
from time import clock
ImportError: cannot import name 'clock' from 'time' (unknown location)
It ran once, got the wrong movie, then never ran again.
Command:
root@Jail|plex:/root/Movie-Extra-Downloader# python3.6 ./Movie-Extra-Downloader.py -d /mnt/storage1/mymedia/test/Die\ Hard\ (1988)/
Output:
Downloading tmdb movie search page.
Traceback (most recent call last):
File "./Movie-Extra-Downloader.py", line 109, in
handle_directory(args.directory)
File "./Movie-Extra-Downloader.py", line 27, in handle_directory
directory = Directory.load_directory(os.path.join(records, os.path.split(folder)[1]))
File "/root/Movie-Extra-Downloader/directory.py", line 40, in load_directory
with open(file, 'r') as load_file:
IsADirectoryError: [Errno 21] Is a directory: './records/'
FreeBSD: 11.2-RELEASE
Installed modules:
root@Jail|plex:/root/Movie-Extra-Downloader# pip list
Package Version
beautifulsoup4 4.6.1
cachetools 2.1.0
certifi 2018.4.16
chardet 3.0.4
google 2.0.1
google-api-python-client 1.7.4
google-auth 1.5.1
google-auth-httplib2 0.0.3
httplib2 0.11.3
idna 2.7
kwconfig 1.1.7
pip 18.0
pyasn1 0.4.4
pyasn1-modules 0.2.2
pytz 2018.5
requests 2.19.1
rsa 3.4.2
setuptools 39.2.0
six 1.11.0
uritemplate 3.0.0
urllib3 1.23
youtube-dl 2018.8.4
Hi, I have no idea why I m getting this
pi@raspberrypi:~/Movie-Extra-Downloader $ python3 Movie-Extra-Downloader.py -d /mnt/GD/Movies/A Rainy Day in New York (2019)
-bash: syntax error near unexpected token `('
Hi @KBlixt is it possible to try to download only Trailes with german Language?
Seems like an edge case:
Code breaks when TMDB match returns is more than +/- 1 year of release date.
Example: Need for Speed (2014)
TMDB look up returns Need for Speed (2018)
directory.py - Line 126 only accepts movie_release_year + / - 1 so you get a KeyError: 'release_date'
You can bypass this error by removing the TMDB key (quick fix) from default_config
Could you please list the required python modules in the README.md or include a requirments.txt. thanks.
Edit: Issue on my end with permssions.
I had a few false positives,
So I have to delete the records before it'll check that movie, I deleted the entire records folder now it's re-downloading thousands of trailers. Yeah, I should have only removed the records of the movies that I wanted fixed, but I didn't know.
Could you have it check if the trailer exists then skip it ?
I have been running with -l to pull trailers for my library. Most movies work fine. Some movies cause the script to end prematurely, with the following output:
Traceback (most recent call last):
File "Movie-Extra-Downloader.py", line 165, in
handle_library(args.library)
File "Movie-Extra-Downloader.py", line 140, in handle_library
handle_directory(os.path.join(library, folder))
File "Movie-Extra-Downloader.py", line 101, in handle_directory
download_extra(directory, extra_config, tmp_folder)
File "/home/trailer/Movie-Extra-Downloader/main.py", line 129, in download_extra
process_trailers_config(tmp_folder)
File "/home/trailer/Movie-Extra-Downloader/main.py", line 11, in process_trailers_config
finder.search()
File "/home/trailer/Movie-Extra-Downloader/extra_finder.py", line 113, in search
video = create_youtube_video()
File "/home/trailer/Movie-Extra-Downloader/extra_finder.py", line 62, in create_youtube_video
youtube_video['average_rating'] * (1 - 1 / ((youtube_video['view_count'] / 60) ** 0.5))
TypeError: unsupported operand type(s) for *: 'NoneType' and 'float'
I think the config files use Unix style '0x0a' line breaks. I'm just guessing, but this might be unsuitable for Windows users. For me, this seems to have caused it to fail to use the API key. Again just a guess. Adding some line breaks in the config file allowed me to sort of continue.
Now I get no errors but the script doesn't seem to do much.
"Downloading tmdb search page."
Then exits...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.