
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Essential Python library that scrapes HTTP(S) and UDP trackers for torrent information.
A tiny Python library that lets you scrape HTTP(S) and UDP trackers for torrent information.
Scrapeer-py is a Python port of the original PHP Scrapeer library by TorrentPier.
Scrapeer-py allows you to retrieve peer information from BitTorrent trackers using both HTTP(S) and UDP protocols. It can fetch seeders, leechers, and completed download counts for multiple torrents from multiple trackers simultaneously.
pip install scrapeer
from scrapeer import Scraper
# Initialize the scraper
scraper = Scraper()
# Define your infohashes and trackers
infohashes = [
"0123456789abcdef0123456789abcdef01234567",
"fedcba9876543210fedcba9876543210fedcba98"
]
trackers = [
"udp://tracker.example.com:80",
"http://tracker.example.org:6969/announce",
"https://private-tracker.example.net:443/YOUR_PASSKEY/announce"
]
# Get the results (timeout of 3 seconds per tracker)
results = scraper.scrape(
hashes=infohashes,
trackers=trackers,
timeout=3
)
# Print the results
for infohash, data in results.items():
print(f"Results for {infohash}:")
print(f" Seeders: {data['seeders']}")
print(f" Leechers: {data['leechers']}")
print(f" Completed: {data['completed']}")
# Check if there were any errors
if scraper.has_errors():
print("\nErrors:")
for error in scraper.get_errors():
print(f" {error}")
Scrapeer-py is organized into the following modules:
scrapeer/
- Main package directory
__init__.py
- Package initialization that exports the Scraper classscraper.py
- Main Scraper class implementationhttp.py
- HTTP(S) protocol scraping functionalityudp.py
- UDP protocol scraping functionalityutils.py
- Utility functions used across the packageScraper
classscrape(hashes, trackers, max_trackers=None, timeout=2, announce=False)
Scrape trackers for torrent information.
Parameters:
hashes
: List (>1) or string of infohash(es)trackers
: List (>1) or string of tracker(s)max_trackers
: (Optional) Maximum number of trackers to be scraped, Default alltimeout
: (Optional) Maximum time for each tracker scrape in seconds, Default 2announce
: (Optional) Use announce instead of scrape, Default FalseReturns:
has_errors()
Checks if there are any errors.
bool
: True if errors are present, False otherwiseget_errors()
Returns all the errors that were logged.
list
: All the logged errorsThis project is licensed under the MIT License - see the LICENSE.txt file for details.
FAQs
Essential Python library that scrapes HTTP(S) and UDP trackers for torrent information.
We found that scrapeer demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.