misobarisic / redgifs-downloader

Downloading videos from RedGIFs has never been easier
https://www.npmjs.com/package/redgifs-downloader
MIT License
48 stars 3 forks source link

Nothing happens in "Simple Approach" #16

Open TadavomnisT opened 2 years ago

TadavomnisT commented 2 years ago

Hia:3 and Thank you for this scraper.

I'm not sure what I'm doing... but when I try this:

const RedgifsDownloader = require("redgifs-downloader")

const downloader = RedgifsDownloader.create("./gifs")

downloader.downloadUser("em_the_femboy")

The script executes successfully, with no result. It doesn't even create "./gifs" directory (if it should).


I also tried your "Advanced Approach" , to get logs:

const RedgifsDownloader = require("redgifs-downloader")
const downloader = RedgifsDownloader.create("./gifs")

downloader.addEventListener("onInit", info => {
    console.log("[onInit]", info)
})
downloader.addEventListener("onStart", info => {
    console.log("[onStart]", info)
})
downloader.addEventListener("onFinish", info => {
    console.log("[onFinish]", info)
})
downloader.addEventListener("onFileDownloadStart", info => {
    console.log("[onFileDownloadStart]", info)
})
downloader.addEventListener("onFileDownloadFinish", info => {
    console.log("[onFileDownloadFinish]", info)
})
downloader.addEventListener("onFileDownloadSkip", info => {
    console.log("[onFileDownloadSkip]", info)
})
downloader.addEventListener("onGetLinks", info => {
    console.log("[onGetLinks]", info)
})
downloader.addEventListener("onError", info => {
    console.log("[onError]", info)
})

downloader.downloadUser("em_the_femboy")

The result:

┌──(user㉿dhcppc4)-[~/Desktop]
└─$ nodejs redgifs.js

[onInit] { userMode: true,
  query: 'em_the_femboy',
  useMobile: false,
  skipExisting: false,
  date: 2022-10-18T14:04:10.546Z }
[onStart] { availableFiles: 0,
  date: 2022-10-18T14:04:11.189Z,
  numberToDownload: 'not specified',
  query: 'em_the_femboy',
  userMode: true }
[onGetLinks] { links: [],
  date: 2022-10-18T14:04:11.190Z,
  options: { useMobile: false, skipExisting: false } }
[onFinish] { availableFiles: 0,
  date: 2022-10-18T14:04:11.190Z,
  numberToDownload: 'not specified',
  query: 'em_the_femboy',
  userMode: true }

It says query: 'em_the_femboy' and availableFiles: 0 which makes me think that I'm doing sth really wrong! Does it have something to do with user's id? or... ? Any clue what am I missing? BTW your "Standalone Links API" works fine, and gets me a complete JSON.

Thanks in advance.