mikf / gallery-dl

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

How to install #532

Closed OvertPerson closed 4 years ago

OvertPerson commented 4 years ago

I have no idea what to do or how to start.

Thank you

kattjevfel commented 4 years ago

If you're on windows you can simply download the .exe from the latest release here: https://github.com/mikf/gallery-dl/releases

For other OSes you can read here: https://github.com/mikf/gallery-dl#installation

OvertPerson commented 4 years ago

Do I just download the .exe because it instantly crashes whenever I try to use run it.

kattjevfel commented 4 years ago

From my understanding yes that should be all you have to do, though I don't have access to any windows computer so someone else will have to help you there.

panhartstuff commented 4 years ago

IMO, it's way easier to just use pip. Easier to update too.

  1. Download and install Python 3.4+: https://www.python.org/downloads/
  2. Press Win+R, type in cmd then press enter.
  3. Type the following to the command prompt once it shows up, then press enter: py -3 -m pip install --upgrade pip setuptools wheel
  4. Once it's finished, type in the following and press enter: py -3 -m pip install --upgrade gallery-dl
  5. After installation is complete, you can use it by entering gallery-dl "URL" to the command prompt Example: gallery-dl "https://twitter.com/hanabushi_/media"

Optional:

  1. Read the section on Authentication, if you want a better experience on certain sites: https://github.com/mikf/gallery-dl#authentication
  2. Enter gallery-dl --help to the command prompt for an overview of possible command line options.
  3. If you want even more customization, open this link, press Ctrl+S, type in %USERPROFILE% to the file explorer's address bar, then press enter and click on Save: https://raw.githubusercontent.com/mikf/gallery-dl/master/docs/gallery-dl.conf
  4. Open the .conf file in your notepad (or get notepad++ for an easier time) and read the following for ways to customize it: https://github.com/mikf/gallery-dl/blob/master/docs/configuration.rst https://github.com/mikf/gallery-dl/blob/master/docs/gallery-dl.conf https://github.com/mikf/gallery-dl/blob/master/docs/gallery-dl-example.conf
indrakaw commented 4 years ago

gallery-dl binary EXE is available on releases page. You don't have to install Python 3 runtime to get it. You can get it installed via https://scoop.sh too. https://github.com/niheaven/scoop-main/blob/master/bucket/gallery-dl.json

gallery-dl is a command line program and doesn't has GUI, so as you said:

Do I just download the .exe because it instantly crashes whenever I try to use run it.

It isn't crashed; it terminated itself. I assumed you just double clicked it or Run on desktop.

For ones who never used on Command Line Interface (CLI) or ones haven't get the basic, it wouldn't help...

Here's a quick rundown for those who have difficult to run this program, even though you have zero experience on CLI.

Assuming:

Step-by-step:

  1. Run Windows command-line (cmd), you can find it on Start Button.
  2. It will initialized on User Profile path (eg. C:\Users\indra).
  3. Now navigate/change it to Download directory by type and run (enter) cd Download.
  4. Your current directory on CLI is now on Download directory. It's basically like entering a directory on Windows Explorer by double click it.
    • confirm that you are on Download directory by run explorer . (yes, with dot at the end)
  5. Run it, test it by gallery-dl.exe -h and it shows help message.
    • Example: gallery-dl.exe https://twitter.com/tkmiz/mediaIt downloads whole media and saved it on gallery-dl right under your current working directory (Download).
biznizz commented 4 years ago

As someone who's comparatively a caveman when it comes to all these informed people, here's what I did to get set up.

  1. Install the latest Python 3 build.
  2. Install pip using Command Line
  3. Use pip-CL to install Requests, pyOpenSSL, and other helpful things before downloading gallery-dl.
  4. Download an example gallery-dl.config and put it in %USERPRORILE% folder to customize it in Notepad++ to suit my needs and input my information.
  5. Set one of my PATH directions to my Python installation where gallery-dl is installed.
  6. Have fun!

I'm running Windows 10, and I haven't really had to input "py -3 -m" into Command Prompt before using pip or gallery-dl or had to put quotes on my inputted URL; I've always been able to run/update both just by inputting pip install --update gallery-dl or something like gallery-dl https://www.deviantart.com/jamesmantheregenold/gallery/all.

Hrxn commented 4 years ago

gallery-dl binary EXE is available on releases page. You don't have to install Python 3 runtime to get it. You can get it installed via https://scoop.sh too. https://github.com/niheaven/scoop-main/blob/master/bucket/gallery-dl.json

BTW, that scoop package is somewhat outdated. I do not recommend using that.

I'm running Windows 10, and I haven't really had to input "py -3 -m" into Command Prompt before using pip or gallery-dl or had to put quotes on my inputted URL; I've always been able to run/update both just by inputting pip install --update gallery-dl or something like gallery-dl https://www.deviantart.com/jamesmantheregenold/gallery/all.

Well, always putting quotes around URLs is definitely a very good practice. py -3 is the version independent Python launcher for Windows, you don't need that if you did a normal installation of Python 3, but it's a safe fallback because it is, well version independent, i.e. it's supposed to work with multiple Python installations with different versions, different installation locations and different options, all on the same system.

But yeah, all you have to do is basically that point number 1 from your list:

pip is already included with the default installation preset. The only thing you have to make sure is that the option to "add Python to the PATH" is used during the installation, which should be, as far as I know, the default option when running the installer. There's a checkmark, and it should already be selected if you don't change it during the setup.

Then you have pip in your PATH and you can always use it, anytime, everywhere. Now you can install gallery-dl simply by running pip install gallery-dl, you don't have to install requests manually, pip takes care of all necessary dependencies.

indrakaw commented 4 years ago

@Hrxn, scoop has auto update. There is an option to download latest version than indexed main bucket, but it way advanced and isn't recommend for stability.

I might ask for package update there.

biznizz commented 4 years ago

pip is already included with the default installation preset. The only thing you have to make sure is that the option to "add Python to the PATH" is used during the installation, which should be, as far as I know, the default option when running the installer. There's a checkmark, and it should already be selected if you don't change it during the setup.

Then you have pip in your PATH and you can always use it, anytime, everywhere. Now you can install gallery-dl simply by running pip install gallery-dl, you don't have to install requests manually, pip takes care of all necessary dependencies.

I didn't notice that until I upgraded to 3.8 just last weekend, was very convenient and a pleasant surprise! I think I started using gallery back before it included the others like setuptools or wheel or, in this case, Requests. Hell, when I first found this program, I had to install Requests with pipenv and didn't even know that it was on PyPi.

Well, always putting quotes around URLs is definitely a very good practice.

As I've said, I know nothing of programming, other than knowing that that quotes and especially commas are vitally important with coding. If there's another reason to put the site in quotes, I might do that, but I just found it convenient that I could just Ctrl-V the site I was using after typing in the command name and hitting enter; especially if I'm only downloading like a number of individual images from deviantart.