2017 © Pedro PelĂĄez
 

library torrent-scraper

Provide an abstraction to seach for torrent files on many websites.

image

inkrement/torrent-scraper

Provide an abstraction to seach for torrent files on many websites.

  • Sunday, October 23, 2016
  • by inkrement
  • Repository
  • 1 Watchers
  • 2 Stars
  • 40 Installations
  • HTML
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 5 Open issues
  • 9 Versions
  • 0 % Grown

The README.md

Torrent Scraper

This library is based on Fernando Carlétti`s torrent-scraper. It provides an abstraction to search for torrent files across some torrent websites., (*1)

Usage

First you have to install it using composer:, (*2)

composer require inkrement/torrent-scraper
<?php

require 'vendor/autoload.php';
use Inkrement\TorrentScraper\TorrentScraperService;

date_default_timezone_set('UTC');

$scraperService = new TorrentScraperService(['ezTv', 'ThePirateBay']);
$results = $scraperService->search('elementaryos');

foreach($tracker as $tracker_results){
  echo $tracker_results->getTracker()."\n";

  foreach ($tracker_results->getSearchResult() as $result) {
      $result->getName();
      $result->getSeeders();
      $result->getLeechers();
      $result->getTorrentUrl();
      $result->getMagnetUrl();
  }
}


Proxy

You can pass Guzzle httpClient options directly to the adapters., (*3)

$scraperService = new TorrentScraperService();

//add adapter
$pirateBayAdapter = new ThePirateBayAdapter(['proxy' => 'http://username:password@example.com:3128']);
$scraperService->addAdapter($pirateBayAdapter);

$result = $scraperService->search('elementaryos');

Available adapters

The Versions

23/07 2016
23/07 2016