Guía Herramientas (Actualizado) Guía para descargar con gallery-dl

NikoCast6

Lurker
Registrado
25 Dic 2024
Mensajes
107
Puntos de reacción
1
Originally posted in this thread where few would ever see it. I thought I'd post an update in my profile, but there's a pretty short length limit on profile posts. So here let me welcome you to my:

:HACKERMANS: _______GUIDE TO GALLERY-DL______ :HACKERMANS:
[ free + open source ]

Q: why tf should I use gallery-dl?A:it magically downloads photo albums - social media - file hosts - image hosts

Q: what sites can it download from?A:instagram + twitter + tiktok + reddit + pinterest + imagefap + redgifs + goonbox

Q: is that all?A: fuck no. it also downloads from:bunkr + gofile + pixeldrain + turbo + tube sites + a shitload more

:HACKERMANS: WHAT YOU NEED TO KNOW: :HACKERMANS:




  • The answer to whatever you want to know is on the codeberg page: https://codeberg.org/mikf/gallery-dl
    • this includes supported sites, errors (see Issues), how to install, etc.
    • this was formerly on github (https://github.com/mikf/gallery-dl), which can still be helpful for past issues/discussions
  • Benefits of downloading with gallery-dl
    • it simplifies downloading from any site it supports
    • supported sites include instagram, twitter, tiktok, reddit, imagefap, redgifs, cxxmer/kemono, pictoa, pinterest, goonbox, bunkr, gofile, pixeldrain, turbo, many tube sites, many image hosts, and a ton more
    • it makes downloading photo albums painless (especially for sites not equipped to handle image dumps. read: bunkr!)
    • it maintains a database of completed downloads so you don't unwittingly re-dl files you already saved. This also means you can return to that [instagram/reddit/whatever] profile from time to time and it will dl only the new files since last time
  • It's really fucking easy to use
    • basic usage:
      • to download a bunkr album,
        Código:
        gallery-dl https://bunkr.cr/a/RE4jsE8Q
        <- test album. try it out!
      • to download a single file from bunkr,
        Código:
        gallery-dl https://bunkr.cr/f/zGPPQCux9yOYf
      • to download all posts from an instagram profile,
        Código:
        gallery-dl https://www.instagram.com/rachelrileyrr
      • to download tagged posts,
        Código:
        gallery-dl https://www.instagram.com/rachelrileyrr/tagged
        • or replace 'tagged' with 'reels', 'stories', etc. makes sense?
        • alternatively, use
          Código:
          gallery-dl -o include=posts,tagged,reels https://www.instagram.com/rachelrileyrr
    • it's also massively configurable via config file once you learn the ropes (e.g. automatically name files however you want! organize download locations however you want! damn it's so good!)
  • You should install gallery-dl (and any command line tools) using a package manager
    • a package manager keeps all your command line software up to date, including its dependencies, and organizes them all on your system where they can find each other
      • if you're new to the command line, making sure you have needed dependencies, keeping them properly updated, and figuring out how to make the (god damn!) things find each other is the vast majority of headaches you suffer to get any (god. damned.) program working
      • these problems become moot when you use a package manager
      • srsly, especially if you're new to this, don't fuck around with downloading binaries yourself, let the package manager do it for you. And don't come bitching when you can't get it to work because you ignored this advice
    • mac: gallery-dl is available through Homebrew (most popular) & macports
      • macports has better compatibility with more systems, as Homebrew limits support to newer devices/OSes
      • example usage - it is easy:
        • Código:
          sudo port install gallery-dl
          installs the program and its required dependencies
        • Código:
          sudo port selfupdate
          keeps macports up to date and downloads latest info about available programs
        • Código:
          sudo port upgrade outdated
          upgrades all your installed programs to the latest versions
    • windows: supported pkg managers for windows are Chocolatey and Scoop. idk I don't use windows, but same concept
    • linux: linux users already know what package manager they use. shut up
    • super mega bonus tip: if everything is working and you feel comfortable, you can begin updating on your own to the nightly (aka development) version. it can take a few days or more for additions and bug fixes to make it to a release, but you're guaranteed the latest when you install the nightly. follow the directions under "Install the latest dev version directly from master" -> https://codeberg.org/mikf/gallery-dl#pip <-
  • If something used to work and now it doesn't, upgrade your software to latest versions
    • stuff breaks all the time. websites make a small change that breaks tools and developers need to make changes to keep everything pointed in the right direction. this is how stuff works
    • even if you just upgraded yesterday, check again today. devs of popular software release new versions frequently
    • if you want fixes before they're even released, check the super mega bonus tip above
  • If something is not working, look to the codeberg issues page
    • i'll even link to it for you: https://codeberg.org/mikf/gallery-dl/issues
    • don't ask about the latest bug here or anywhere else other than the gallery-dl repo - nobody knows or cares. ask about it at the link i gave 1 line above this (search for it first because somebody has probably brought it up already)
    • new bugs and stuff will be in "Open" issues. everything anyone's ever asked about will be in "Closed" issues. make sure you are checking both
  • Go forth and download
    • if you're new to the command line, remember that "new" is not the same as "hard". at one time you didn't know how to pick your nose
    • Código:
      Ctrl+C
      exits you out of running programs
    • remember to go outside every few days, now that you have this power it can be hard to stop using it

ADDITIONAL Q&A:

Q: are you affiliated with gallery-dl?A:not at all. it's just life-changing software that i've spent a lot of time learning and using, and more people should know about and use it.

Q: now that i'm using gallery-dl, will you also come over and jerk me off?A:if you're reasonably fit, young, and don't have a beard, yeah i'll probably do it.
 
me encanta gallery-dl pero cada vez que lo he usado me han bloqueado las cuentas, qué molesto, creen que soy un bot pero solo soy un eficiente coleccionista de deliciosos tesoros :peepoShy:. no es exclusivo de gallery-dl, he probado otras herramientas parecidas y también he logrado que me bloqueen con ellas. solo quiero avisar a cualquiera que siga esta útil guía que cuando caminas por el sendero del scraper, puede que tus cuentas sean tratadas como esos malditos CLANKERS y te baneen :BongoBan:, ¡¡así que haz scraping con discreción!!
 
Para quien esté preocupado, si solo lees una línea de este post: esto no es algo común, se puede evitar, y si no inicias sesión a propósito en una cuenta ni siquiera es posible.

Algo a tener en cuenta si estás scrapeando cantidades masivas de contenido. Casi nunca uso cuentas en ningún sitio del que descargo: descargo regularmente de Instagram y TikTok, pero creo que la única vez que usé cookies autenticadas fue para acceder a posts con restricción de edad en Twitter. Y claro, vas a saber si lo estás haciendo, y puedes revisar primero la información en los repos. El desarrollador es muy activo y los extractores están diseñados para evitar problemas, pero también nos toca a nosotros leer la documentación primero para asegurarnos de usar las herramientas de forma segura.

Sería útil que describieras brevemente qué pasó, cuándo fue y de qué sitios estabas descargando. Claro que puede pasar, pero es raro, mucho más raro si no descargas a gran escala, e imposible si no te autenticas. Mi objetivo aquí era ayudar a la gente a ver lo fácil que puede ser, y lo que no quiero es asustar a nadie por miedo a algo que es muy poco probable que pase.
 
sí, entonces hablemos de usar cookies autenticadas para descargar de twitter. ¿dónde en los repos deberíamos mirar y qué docs deberíamos leer para reducir el riesgo de bloqueos/suspensiones? por raro que sea, a algunos nos ha pasado...
 
Claro, no dudo de ti. Por cierto, mi post no era un desafío, sino que no quiero que nadie salga huyendo asustado de una herramienta que a mí me cambió la vida en cuanto a eficiencia, organización y a quitarme dolores de cabeza.

No descargo un montón de Twitter, normalmente posts sueltos, pero sí me he bajado una o dos cuentas completas. Eso fue en los últimos 6 meses y no he tenido ningún problema.

El mejor lugar para estar al tanto de las novedades recientes (y de los problemas pasados) es el issue tracker del repo de gallery-dl. En realidad ahora hay 2, desde la mudanza a codeberg, porque el issue tracker de github sigue abierto y activo. También hay una sección de Discussions en el repo de github donde la gente hace preguntas generales.

El uso básico es fácil, pero una vez que le agarras el truco, el verdadero poder está en armar tu config.json para decirle a tus extractors cómo comportarse. Puede tener una curva de aprendizaje mientras aprendes qué hay disponible y cómo funciona la sintaxis, pero con el tiempo las piezas encajan y queda tan bien. Muchas de las opciones son sobre qué descargar, cómo nombrar los archivos y dónde poner cada cosa, pero también hay muchas opciones que le dicen a los extractors cómo interactuar con el sitio. Los extractors están hechos a medida para cada sitio, con sus propias opciones, y explorar lo que hacen esas opciones puede hacerte la vida mejor/más fácil.

Los docs están en la carpeta llamada, pues, "docs". gallery-dl-example.conf muestra la estructura básica de un archivo de config. configuration.rst es un archivo monstruoso que lista todas las opciones disponibles y lo que hacen. Si vas a hacer scraping a lo grande, vas a querer dedicarle bastante tiempo a este archivo. Yo vuelvo a él un montón. Aquí es donde puede tomar un rato construir tu conocimiento, porque es exhaustivo pero no está escrito como un conjunto de instrucciones. Pero empieza a tener sentido a medida que entiendes cómo encaja todo. Por último, gallery-dl.conf es simplemente una lista de absolutamente todas las configuraciones con su valor por defecto, en el mismo formato exacto que se usa en tu archivo de config. Siempre es el más actualizado, se actualiza cuando se agregan nuevas opciones/sitios.

En algún momento me gustaría poner aquí un how-to básico para tu archivo de config con ejemplos. Hubo un hilo el mes pasado sobre descargar posts/hilos de simpcity con gallery-dl y ahí hice un post explicando cómo eso se puede salir de control rápido, así que es mejor definir un objetivo más específico que "bajar todo en este hilo". De todos modos borraron el hilo porque no querían incentivar el scraping del foro. Si algún mod lee esto y quiere mandarme mi post por mensaje privado, sería genial, y quitaré cualquier instrucción sobre scrapear hilos salvo para explicar por qué es mala idea de todos modos.

Para el resto, pregunten lo que quieran en este hilo, con gusto comparto lo que he aprendido.
 
Gallery dl ha sido un regalo del cielo para mí desde que empecé a usarlo a principios de este año.

justo esta última semana me puse a montar un descargador automático de stories de tiktok e instagram y encontré un git project que usaba gallery dl para instagram y yt dlp para tiktok. después de modificar mucho el proyecto por fin tengo un monitor automático para stories y posts de tiktok, con descargas automáticas y también revisiones posteriores para reemplazar posts por versiones de mayor calidad pasado cierto tiempo, ya que tiktok al menos no suele dar la mejor resolución siempre, sobre todo justo después de publicar.

Todavía me falta añadir la grabación y descarga automática de lives de tiktok y luego pasar a la parte de instagram, para capturar automáticamente sobre todo las stories también con la misma configuración, pero hasta ahora se ve bastante bien.

perdón si este no es el lugar, pero como es un hilo de gallery dl pensé que podría ser relevante o útil para quienes estén investigando opciones con él.
 
Lamentablemente no he tenido suerte con nada. :Sadge:

Probé todo lo de abajo con VPN, Instaloader da 429 al instante. Vi un issue que dice que el endpoint de la API de perfil que usan está obsoleto, alguien tiene un pull request con un arreglo, así que quizá lo intente de nuevo si lo mergean.

Un tutorial online dice que pruebe primero gallery-dl con la opción simulate, pero me dice que no encuentra el perfil. Un issue decía que para bajar cuentas NSFW, incluso públicas, probablemente hay que iniciar sesión.

Intenté crear una cuenta nueva para gallery-dl o algo como Gramoire, pero parece que IG hace shadow block a los correos de Protonmail, porque no aceptaba mi código de verificación. Lo intenté de nuevo con un correo de 10 minutos y sí aceptó el código, pero después querían un número de teléfono. No quiero probar con una de mis cuentas reales / arriesgarme a vincular una desechable con mis cuentas reales.

---

¿Ustedes pueden descargar posts de IG sin iniciar sesión ni dar cookies a la herramienta que usen? ¿O inician sesión arriesgando una cuenta real, o simplemente lograron hacer cuentas desechables que les dan igual? La cuenta principal que quiero bajar no es privada, así que esperaba poder hacer algo sin iniciar sesión.
 
La funcionalidad de ig está muerta hasta que el dueño la actualice, y probablemente no la actualice en un buen rato
 
Atrás
Arriba