mikf / gallery-dl

Command-line program to download image galleries and collections from several image hosting sites
GNU General Public License v2.0
11.94k stars 975 forks source link

Doubt on MP4 #4229

Closed CashOver closed 3 weeks ago

CashOver commented 1 year ago

I would like to know how I could download videos on pinterest or between websites

mikf commented 1 year ago

Downloading videos on Pinterest needs youtube-dl/yt-dlp to be installed alongside gallery-dl when you installed with pip.

I don't know what you mean with "or between websites".

CashOver commented 1 year ago

how can i download youtube-dl and just ignore the "or between websites"

mikf commented 1 year ago

pip install yt-dlp

CashOver commented 1 year ago

thank you

mikf commented 1 year ago

I've looked into this whole Pinterest videos thing a bit more, and, as it turns out, most of the recent videos are actually "story" pins, which are not yet supported.

Real video pins work when ytdl is installed.

$ gallery-dl https://www.pinterest.com/pin/422564377542934214/
/tmp/_/pinterest/pinterest_422564377542934214.mp4

For story pins it only downloads the preview image, even though there is an "embedded" video

$ gallery-dl https://www.pinterest.com/pin/870954015416439245/
/tmp/_/pinterest/pinterest_870954015416439245.jpg
CashOver commented 1 year ago

Hi, I would like to know how I could fix this error, because every time I download it in folder format it causes this problem :

"\gallery-dl\pinterest\singhraaz079\pinterest_633670610091744913.mp4[downloader.ytdl][error] ERROR: You have requested merging of multiple formats but ffmpeg is not installed. Aborting due to --abort-on-error"

example : https://br.pinterest.com/AnimexRyan/waifuryan/

rautamiekka commented 1 year ago

It says exactly what's wrong.

CashOver commented 1 year ago

Well, every time I go to the images and videos on pinterest I don't know where the error is or I'll have to add:

config: ``` json "extractor": { "base-directory": "./gallery-dl/", "parent-directory": false, "postprocessors": null, "archive": null, "cookies": null, "cookies-update": true, "proxy": null, "skip": true, "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/112.0", "retries": 4, "timeout": 30.0, "verify": true, "fallback": true, "sleep": 0, "sleep-request": 0, "sleep-extractor": 0, "path-restrict": "auto", "path-replace": "_", "path-remove": "\\u0000-\\u001f\\u007f", "path-strip": "auto", "path-extended": true, "extension-map": { "jpeg": "jpg", "jpe" : "jpg", "jfif": "jpg", "jif" : "jpg", "jfi" : "jpg" }, "ytdl": { "enabled": false, "format": "bestvideo+bestaudio/best", "generic": true, "logging": true, "module": null, "raw-options": { "quiet": true, "writesubtitles": true, "merge_output_format": "mp4" } }, "downloader": { "filesize-min": null, "filesize-max": null, "mtime": true, "part": true, "part-directory": null, "progress": 3.0, "rate": null, "retries": 4, "timeout": 30.0, "verify": true, "http": { "adjust-extensions": true, "chunk-size": 32768, "headers": null }, "ytdl": { "format": "bestvideo+bestaudio/best", "forward-cookies": false, "logging": true, "module": null, "outtmpl": null, "raw-options": { "quiet": true, "writesubtitles": true, "merge_output_format": "mp4" } } }, "output": { "mode": "auto", "progress": true, "shorten": true, "ansi": false, "colors": { "success": "1;32", "skip" : "2" }, "skip": true, "log": "[{name}][{levelname}] {message}", "logfile": null, "unsupportedfile": null }, "netrc": false } ```

I would like to know how you can help me

mikf commented 1 year ago

Reading the error message helps. https://github.com/yt-dlp/yt-dlp#strongly-recommended

dwiehoff commented 1 year ago

when running pip install yt-dlp, I get Requirement already satisfied and yet: [download][error] Failed to download pinterest_123456789.mp4

Anyone an idea what may be the issue or how to resolve this?

rautamiekka commented 1 year ago

when running pip install yt-dlp, I get Requirement already satisfied and yet: [download][error] Failed to download pinterest_123456789.mp4

Anyone an idea what may be the issue or how to resolve this?

Provide the command used, the full output log when using --verbose, and the config file, from all of which you censored your usernames/passwords/ID's of course.

dwiehoff commented 1 year ago

command used:

gallery-dl --cookies "$HOME/Downloads/www.pinterest.de_cookies.txt" "https://www.pinterest.de/username/board/" --verbose

config file: no changes

output log:

[gallery-dl][debug] Version 1.25.8
[gallery-dl][debug] Python 3.11.4 - macOS-13.2-x86_64-i386-64bit
[gallery-dl][debug] requests 2.31.0 - urllib3 2.0.3
[gallery-dl][debug] Configuration Files []
...
[downloader.ytdl][error] Cannot import module 'youtube_dl'
[downloader.ytdl][debug]
Traceback (most recent call last):
  File "/usr/local/Cellar/gallery-dl/1.25.8/libexec/lib/python3.11/site-packages/gallery_dl/ytdl.py", line 20, in import_module
    return __import__("yt_dlp")
           ^^^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named 'yt_dlp'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/Cellar/gallery-dl/1.25.8/libexec/lib/python3.11/site-packages/gallery_dl/downloader/ytdl.py", line 44, in download
    module = ytdl.import_module(self.config("module"))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/gallery-dl/1.25.8/libexec/lib/python3.11/site-packages/gallery_dl/ytdl.py", line 22, in import_module
    return __import__("youtube_dl")
           ^^^^^^^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named 'youtube_dl'
...

Turns out the script is unable to access yt_dlp. However, pip install yt_dlp, gives me:

Requirement already satisfied: yt_dlp in /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages (2023.3.4)
Requirement already satisfied: mutagen in /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages (from yt_dlp) (1.46.0)
Requirement already satisfied: pycryptodomex in /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages (from yt_dlp) (3.18.0)
Requirement already satisfied: websockets in /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages (from yt_dlp) (11.0.3)
Requirement already satisfied: certifi in /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages (from yt_dlp) (2023.5.7)
Requirement already satisfied: brotli in /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages (from yt_dlp) (1.0.9)

What may be causing this?

Hrxn commented 1 year ago

Different Python installations?

dwiehoff commented 1 year ago

Different Python installations?

I'm assuming one of these I've installed using Homebrew and one came with the system. Do you happen to know if there's an easy way to resolve this if this is what's causing the issue?

/usr/bin/python3
/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages
rautamiekka commented 1 year ago

Use the 2nd method in https://www.cyberciti.biz/faq/appleosx-bash-unix-change-set-path-environment-variable/ to put the system one after the Homebrew one.

dwiehoff commented 1 year ago

Use the 2nd method in https://www.cyberciti.biz/faq/appleosx-bash-unix-change-set-path-environment-variable/ to put the system one after the Homebrew one.

Appreciate it. That did the trick.

glottisfaun0000 commented 1 year ago

Use the 2nd method in https://www.cyberciti.biz/faq/appleosx-bash-unix-change-set-path-environment-variable/ to put the system one after the Homebrew one.

If you have a free sec could you explain in some more detail? ls -l /etc/paths.d for me returns 10-cryptex & mono-commands. Am I to be adding /opt/homebrew/bin to one of these?

I'm getting ERROR: You have requested merging of multiple formats but ffmpeg is not installed. only when sending commands over SSH.