Skip to content

Latest commit

 

History

History
46 lines (36 loc) · 1.58 KB

Onejav.md

File metadata and controls

46 lines (36 loc) · 1.58 KB

OneJav Torrent Fetcher

A standalone script that automates the process of fetching torrent files from OneJav.com. The script crawls the website's daily listings, extracts torrent links, and downloads them locally.

Features

  • Fetches torrent links from specified dates (defaults to yesterday)
  • Smart pagination handling - automatically detects and fetches all available pages
  • Automatic torrent file downloading
  • Built-in rate limiting to prevent server overload
  • User-agent spoofing for reliable access
  • Error handling and logging

Requirements

  • Deno runtime environment
  • Internet access
  • Write permissions for local directory

Usage

Run the script with the necessary permissions:

deno run --allow-net --allow-write fetchOnejav.js

Configuration Options

The script accepts several configuration parameters:

Function Parameters

  • dateStr: (Optional) Specific date to fetch torrents from (format: YYYY-MM-DD)
    • Defaults to yesterday's date if not specified

Pagination

  • Automatically detects the presence of additional pages
  • Continues fetching until no more pages are available
  • Uses the site's pagination system to ensure complete coverage
  • Includes built-in delay between page requests to respect server resources

Output

  • All downloaded torrent files are saved to ./torrents/ directory
  • Directory is automatically created if it doesn't exist
  • Files are saved with their original filenames

Rate Limiting

  • 1-second delay between torrent downloads
  • Additional 1-second delay between page requests
  • Respects server resources and prevents rate limiting