1.240302.1 • Published 2 months ago

@spacepumpkin/torrent-galaxy-api v1.240302.1

Weekly downloads
-
License
ISC
Repository
-
Last release
2 months ago

Install

npm i @spacepumpkin/torrent-galaxy-api

Example

import { search, setAntiCaptchaApiKey } from '@spacepumpkin/galaxy-torrent-api'

// Set anti-captcha.com api key to bypass galaxyfence
setAntiCaptchaApiKey('your api key')
// Get results for black mirror that are not older than 1st Jan 2023
const results: Array<Listing> = search('black mirror', new Date("2023-01-01"))
type Listing = Partial<{
  /** link to the full galaxy torrent page for this torrent */
  href: string
  /** Name of the torrent */
  title: string
  /** IMDb Id related to this listing (if any) */
  imdbId: string
  /** Magnet link for torrent */
  magnet: string
  /** The uploader of this torrent */
  uploader: string
  /** Upload date */
  uploadDate: Date
  /** Size of the torrent (in bytes) */
  size: number
  /** Seeder count at time of fetch */
  seeders: number
  /** Leacher count at time of fetch */
  leachers: number
  /** Whether or not the torrent is from a verified uploader */
  verified: boolean
  /** Language associated with torrent (if any) */
  language: string
}>

GalaxyFence

Occasionally a search will be interrupted by GalaxyFence, the flow is as follows

  1. Makes a call to a search endpoint
  2. Get redirected to /galaxyfence.php
  3. Extract the image url on the page and save PHPSESSID cookie
  4. Send a base64 encoded image to anti-captcha.com
  5. Make a post request to /galaxyfence with the solved captcha
  6. Receive a galaxyfence cookie that gives temporary immunity

This flow is automatic. If a redirect is detected it'll be taken care of before returning search results. To use this feature you will need to provide an anti-captcha api key by calling setAntiCaptchaApiKey(key)

1.240302.1

2 months ago

1.240127.1

4 months ago

1.230722.3

10 months ago

1.230722.2

10 months ago

1.230722.1

10 months ago