torrent-domains 2.0.1
Torrent domains.
License: MIT license
Keywords: torrent_domains

Torrent Domains
=======================


.. image:: https://img.shields.io/pypi/v/torrent_domains.svg
        :target: https://pypi.python.org/pypi/torrent_domains

Python package to generate urls and parse x1337x, BTDB, EZTV, LimeTorrents, ThePirateBay, Zooqle html pages into useful python dictionaries.

Features
--------
* 0 dependencies
* URL generation given keywords:
    - [x] x1337x
    - [x] BTDB
    - [x] EZTV
    - [x] LimeTorrents
    - [x] ThePirateBay
    - [x] Zooqle

* URL generation given a Category or a Sorter:
    - [x] x1337x
    - [x] BTDB
    - [x] EZTV
    - [x] Limetorrents
    - [x] ThePirateBay
    - [x] Zooqle

* URL generation given multiple Categories:
    - [ ] x1337x
    - [ ] BTDB
    - [ ] EZTV
    - [ ] Limetorrents
    - [ ] ThePirateBay
    - [ ] Zooqle


     Note: x1337x, BTDB, EZTV, and LimeTorrents do not need to generate multiple urls, but do need to be able to handle multiple categories being passed in.

* Parse homepage:
    - [x] EZTV
    - [x] LimeTorrents
    - [ ] Zooqle

* Parse search page:
    - [x] x1337x
    - [x] BTDB
    - [x] EZTV
    - [x] LimeTorrents
    - [x] ThePirateBay
    - [x] Zooqle


Usage
--------
Creating a domain object with default urls:

```python
import torrent_domains

torrent_domains.BTDB().url
# 'https://btdb.to'

torrent_domains.EZTV().url
# 'https://eztv.ag'

torrent_domains.LimeTorrents().url
# 'https://limetorrents.info'

torrent_domains.ThePirateBay().url
# 'https://thepiratebay.org'

torrent_domains.Zooqle().url
# 'https://zooqle.com'
```


##Parsing
Simply pass the html to the parse_search_page() method.

The domain's parse_search_page(html) method will yield a generator dictionaries:

```python
import torrent_domains

domain = torrent_domains.ThePirateBay()

# torrents is a list of dictionaries.
torrents = list(domain.parse_search_page('html'))
```

As pages are parsed, trackers are gathered from the magnet links.
You can disable this feature with the following:

```python
import torrent_domains

domain = torrent_domains.ThePirateBay()

#Trackers are not saved:
torrents = list(domain.parse_search_page('html',parse_trackers=False))
trackers = domain.get_trackers() #empty

# Trackers are saved:
torrents = list(domain.parse_search_page('html'))
trackers = domain.get_trackers() #NOT empty
```

### Optional Arguments
#### x1337x
* category
* descending
* page
* sorter
  * SEEDERS
  * TIME
  * SIZE
  * LEECHERS
#### BTDB
* page
* sorter
    * RELEVANCE
    * SIZE
    * FILES
    * ADDTIME
    * POPULARITY
#### EZTV
* category
#### LimeTorrents
* category
* page
* sorter
    * LEECHERS
    * SEEDERS
    * SIZE
    * UPLOADED
#### ThePirateBay
* category
* descending
* sorter
  * NAME
  * LEECHERS
  * SEEDERS
  * SIZE
  * UPLOADED
#### Zooqle
* category
* descending
* page
* sorter
  * SEEDERS
  * SIZE
  * UPLOADED 




--------

##### Universal Categories:
     ALL
     MOVIES
     TV
     AUDIO
     GAMES
     ANIME
     SOFTWARE
     PICTURES
     BOOKS

##### Universal Sorters:
     NAME
     UPLOADED
     SIZE
     SEEDERS
     LEECHERS

Note: ALL is the default category and SEEDERS is the default sorter.

#
### Categories
#####x1337x
  - ALL
  - ANIME
       - Dual Audio
       - Dubbed
       - Raw
       - Subbed
     - APPLICATIONS
       - Android
       - iOS
       - Linux
       - Mac
       - Other
       - PC Software
     - DOCUMENTARIES
       - Documentary
     - GAMES
       - 3DS
       - Dreamcast
       - DS
       - GameCube
       - Other
       - PC Game
       - PS1
       - PS2
       - PS3
       - PS4
       - PSP
       - Switch
       - Wii
       - Xbox
       - Xbox360
     - MOVIES
       - 3D
       - Bollywood
       - Divx/Xvid
       - Dubs/Dual Audio
       - DVD
       - h.264/x264
       - HD
       - HEVC/x265
       - Mp4
       - SVCD/VCD
       - UHD
     - MUSIC
       - AAC
       - Album
       - Box Set
       - Concert
       - Discography
       - DVD
       - Lossless
       - MP3
       - Other
       - Radio
       - Single
       - Video
     - OTHER
       - Audiobook
       - Comics
       - E-Books
       - Emulation
       - Mobile Phone
       - Nulled Scripts
       - Other
       - Sound
       - Tutorials
     - TV
       - Cartoon
       - Divx/Xvid
       - DVD
       - HD
       - HEVC/x265
       - SD
       - SVCD/VCD
     - XXX
       - Games
       - Hentai
       - Magazine
       - Picture
       - Video
Usage
##### BTDB
- ALL
##### EZTV
- TV
##### LimeTorrents
- ALL
- ANIME
- APPLICATIONS
- GAMES
- MOVIES
- MUSIC
- OTHER
- TV
##### ThePirateBay
- ALL
- AUDIO
  - MUSIC
  - AUDIO BOOKS
  - SOUND CLIPS
  - FLAC
  - OTHER
- VIDEO
  - MOVIES
  - MOVIES DVDR
  - MUSIC VIDEOS
  - MOVIE CLIPS
  - TV SHOWS
  - HANDHELD
  - HD MOVIES
  - HD TV SHOWS
  - 3D
  - OTHER
- APPLICATIONS
  - WINDOWS
  - MAC
  - UNIX
  - HANDHELD
  - IOS (iPad/iPhone)
  - ANDROID
  - OTHER
- GAMES
  - PC
  - MAC
  - PSX
  - XBOX360
  - WII
  - HANDHELD
  - IOS (iPad/iPhone)
  - ANDROID
  - OTHER
- OTHER
  - E-BOOKS
  - COMICS
  - PICTURES
  - COVERS
  - PHYSIBLES
  - OTHER
- PORN
  - MOVIES
  - MOVIES DVDR
  - PICTURES
  - GAMES
  - HD MOVIES
  - MOVIE CLIPS
  - OTHER
##### Zooqle
- ALL
- MOVIES
- TV
- MUSIC
- GAMES
- APPLICATIONS
- BOOKS
- ANIME
- OTHER