Closed Rootkit- closed 2 years ago
It is not your fault.
I have tried testing it myself and it seems like their api is broken. Manually querying this returns no useful data. I had already updated the internal links.js
file to reflect the 2021 upgrade.
We just have to wait for them sort their stuff out.
On top of all that. Their API no longer supports publicly getting all gifs of a user. What a shame.
v2/gifs/search
appears to be working now? eg, gifs -> urls -> hd has working links. I came across this repo googling something else, but am successfully using these to download all pages of search terms. same goes for v2/users/<username>/search
!
v2/gifs/search
appears to be working now? eg, gifs -> urls -> hd has working links. I came across this repo googling something else, but am successfully using these to download all pages of search terms. same goes forv2/users/<username>/search
!
Thanks for the info. I'll test it out when I get the chance.
I have pushed a new commit and an update to npm.
` W:\down\py\redgifs-downloader>node sad.js [onInit] { userMode: false, query: 'Teen', useMobile: false, skipExisting: false, date: 2022-01-20T21:00:02.690Z } Error: Request failed with status code 400 at createError (W:\down\py\redgifs-downloader\node_modules\redgifs-downloader\dist\lib.js:568:15) at settle (W:\down\py\redgifs-downloader\node_modules\redgifs-downloader\dist\lib.js:584:12) at IncomingMessage.handleStreamEnd (W:\down\py\redgifs-downloader\node_modules\redgifs-downloader\dist\lib.js:2743:11) at IncomingMessage.emit (node:events:341:22) at endReadableNT (node:internal/streams/readable:1294:12) at processTicksAndRejections (node:internal/process/task_queues:80:21) { config: { url: 'gifs/search?search_text=Teen&count=150&order=trending', method: 'get', headers: { Accept: 'application/json, text/plain, /', 'User-Agent': 'axios/0.21.4' }, baseURL: 'https://api.redgifs.com/v2/', transformRequest: [ [Function: transformRequest] ], transformResponse: [ [Function: transformResponse] ], timeout: 10000, adapter: [Function: httpAdapter], xsrfCookieName: 'XSRF-TOKEN', xsrfHeaderName: 'X-XSRF-TOKEN', maxContentLength: -1, maxBodyLength: -1, validateStatus: [Function: validateStatus], transitional: { silentJSONParsing: true, forcedJSONParsing: true, clarifyTimeoutError: false }, data: undefined }, request: <ref 1> ClientRequest { _events: [Object: null prototype] { socket: [Function (anonymous)], abort: [Function (anonymous)], aborted: [Function (anonymous)], connect: [Function (anonymous)], error: [Function (anonymous)], timeout: [Function (anonymous)], prefinish: [Function: requestOnPrefinish] }, _eventsCount: 7, _maxListeners: undefined, outputData: [], outputSize: 0, writable: true, destroyed: false, _last: true, chunkedEncoding: false, shouldKeepAlive: false, _defaultKeepAlive: true, useChunkedEncodingByDefault: false, sendDate: false, _removedConnection: false, _removedContLen: false, _removedTE: false, _contentLength: 0, _hasBody: true, _trailer: '', finished: true, _headerSent: true, _closed: false, socket: TLSSocket { _tlsOptions: [Object], _secureEstablished: true, _securePending: false, _newSessionPending: false, _controlReleased: true, secureConnecting: false, _SNICallback: null, servername: 'api.redgifs.com', alpnProtocol: false, authorized: true, authorizationError: null, encrypted: true, _events: [Object: null prototype], _eventsCount: 10, connecting: false, _hadError: false, _parent: null, _host: 'api.redgifs.com', _readableState: [ReadableState], _maxListeners: undefined, _writableState: [WritableState], allowHalfOpen: false, _sockname: null, _pendingData: null, _pendingEncoding: '', server: undefined, _server: null, ssl: [TLSWrap], _requestCert: true, _rejectUnauthorized: true, parser: null, _httpMessage: [Circular 1], timeout: 10000,
}, response: { status: 400, statusText: 'Bad Request', headers: { date: 'Thu, 20 Jan 2022 21:00:03 GMT', 'content-type': 'application/json', 'transfer-encoding': 'chunked', connection: 'close', 'cache-control': 'no-store', 'access-control-allow-origin': '', 'access-control-allow-headers': 'Authorization,DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type', 'access-control-allow-methods': 'GET, PUT, POST, DELETE, HEAD, OPTIONS, PATCH', 'access-control-max-age': '86400', 'cf-cache-status': 'MISS', 'expect-ct': 'max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"', 'strict-transport-security': 'max-age=2592000; includeSubDomains; preload', 'x-content-type-options': 'nosniff', server: 'cloudflare', 'cf-ray': '6d0b3ae65bcdc53c-ORD', 'alt-svc': 'h3=":443"; ma=86400, h3-29=":443"; ma=86400' }, config: { url: 'gifs/search?search_text=Teen&count=150&order=trending', method: 'get', headers: [Object], baseURL: 'https://api.redgifs.com/v2/', transformRequest: [Array], transformResponse: [Array], timeout: 10000, adapter: [Function: httpAdapter], xsrfCookieName: 'XSRF-TOKEN', xsrfHeaderName: 'X-XSRF-TOKEN', maxContentLength: -1, maxBodyLength: -1, validateStatus: [Function: validateStatus], transitional: [Object], data: undefined }, request: <ref 1> ClientRequest { _events: [Object: null prototype], _eventsCount: 7, _maxListeners: undefined, outputData: [], outputSize: 0, writable: true, destroyed: false, _last: true, chunkedEncoding: false, shouldKeepAlive: false, _defaultKeepAlive: true, useChunkedEncodingByDefault: false, sendDate: false, _removedConnection: false, _removedContLen: false, _removedTE: false, _contentLength: 0, _hasBody: true, _trailer: '', finished: true, _headerSent: true, _closed: false, socket: [TLSSocket], _header: 'GET /v2/gifs/search?search_text=Teen&count=150&order=trending HTTP/1.1\r\n' + 'Accept: application/json, text/plain, /\r\n' + 'User-Agent: axios/0.21.4\r\n' + 'Host: api.redgifs.com\r\n' + 'Connection: close\r\n' + '\r\n', _keepAliveTimeout: 0, _onPendingData: [Function: noopPendingOutput], agent: [Agent], socketPath: undefined, method: 'GET', maxHeaderSize: undefined, insecureHTTPParser: undefined, path: '/v2/gifs/search?search_text=Teen&count=150&order=trending', _ended: true, res: [IncomingMessage], aborted: false, timeoutCb: null, upgradeOrConnect: false, parser: null, maxHeadersCount: null, reusedSocket: false, host: 'api.redgifs.com', protocol: 'https:', _redirectable: [Writable],
}, isAxiosError: true, toJSON: [Function: toJSON] } [onStart] { availableFiles: 0, date: 2022-01-20T21:00:02.955Z, numberToDownload: 'not specified', query: 'Teen', userMode: false } [onGetLinks] { links: [], date: 2022-01-20T21:00:02.956Z, options: { useMobile: false, skipExisting: false } } [onFinish] { availableFiles: 0, date: 2022-01-20T21:00:02.958Z, numberToDownload: 'not specified', query: 'Teen', userMode: false }
W:\down\py\redgifs-downloader>`
I'm not entirely bad with code... Making me think its something to do with my end though... Desktop version makes the folder and doesn't download either.