Download the PHP package yggverse/scrapeer without Composer
On this page you can find all versions of the php package yggverse/scrapeer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download yggverse/scrapeer
More information about yggverse/scrapeer
Files in yggverse/scrapeer
Package scrapeer
Short Description Essential PHP library that scrapes HTTP(S) and UDP trackers for torrent information
License CC-BY-SA-3.0
Informations about the package scrapeer
Scrapeer
Essential PHP library that scrapes HTTP(S) and UDP trackers for torrent information.
Original image by @alinnnaaaa.
Features
- Retrieves seeders, leechers and completed torrent information
- Supports HTTP, HTTPS and UDP trackers
- Automatically discards invalid trackers and info-hashes
- Allows setting timeout per tracker and max. number of trackers
- Supports up to 64 info-hashes per scrape
- Aims to be as lightweight, straightforward and efficient as possible
- Supports scraping via scrape (default) and announce requests :sparkles:
Note
This is the only official source for Scrapeer. Other repositories — e.g. the ones on Packagist — are unofficial and should be avoided!
Basic usage examples
Single info-hash and single tracker:
- If not specified, the port will default to 80 for HTTP/UDP and to 443 for HTTPS.
- Single elements may also be strings instead of arrays.
Single info-hash and multiple trackers (recommended usage):
- First tracker in the array will be used, if it fails (invalid tracker, invalid info-hash or invalid info-hash for that tracker) the second tracker will be used and so on.
- In this case we get a valid result from the first tracker, notice that we get different information for the same torrent - this is to be expected, as different trackers may be more or less up-to-date than others.
Multiple info-hashes and single tracker:
- Info-hashes can be upper or lower case.
Multiple info-hashes and multiple trackers:
Advanced usage examples
Error logging
- The first tracker is not valid, it will be skipped and an error will be added to the error logger.
- The scraper keeps scraping until one valid tracker is found or there are no more trackers to try.
- Invalid info-hashes will be logged and skipped.
Advanced options
Maximum trackers
- The scraper will stop after the first tracker, regardless of its validity.
- Default: All trackers in the array.
Timeout per tracker
- Each tracker will have a timeout of 3 seconds (total timeout in this case would be 6 seconds).
- Default: 2 seconds (recommended).
Announce scraping
- Default: false.
- Prefer scrape over announce requests for multiple info-hashes (usually faster).
- Note: UDP trackers only return seeders and leechers information. This is a protocol limitation.
FAQs
- What are info-hashes? How do I get them?
From The BitTorrent Protocol Specification:
The 20 byte sha1 hash of the bencoded form of the info value from the metainfo file. Note that this is a substring of the metainfo file. The info-hash must be the hash of the encoded form as found in the .torrent file, regardless of it being invalid. This value will almost certainly have to be escaped.
There are many ways to retrieve the info-hashes from your torrents, a PHP based solution would be torrent-bencode for example.
- I need public trackers! Where can I find some?
Check out newTrackon and trackerslist.