diff options
author | Matt Lyon <matthewlyon18@gmail.com> | 2019-11-03 10:38:05 +1100 |
---|---|---|
committer | Matt Lyon <matthewlyon18@gmail.com> | 2019-11-03 10:38:05 +1100 |
commit | 612087fd74b849525c32dfc4033603808b0c2433 (patch) | |
tree | c6a015b4bb792059a9503066e8a25f8580ad95f8 /tpblite/tpblite.py | |
parent | ae9e8c258acb277eb10220c0ff3a803091efa923 (diff) | |
download | tpb-lite-612087fd74b849525c32dfc4033603808b0c2433.tar.gz tpb-lite-612087fd74b849525c32dfc4033603808b0c2433.tar.bz2 tpb-lite-612087fd74b849525c32dfc4033603808b0c2433.zip |
initial commit for TPB Controller
Diffstat (limited to 'tpblite/tpblite.py')
-rw-r--r-- | tpblite/tpblite.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/tpblite/tpblite.py b/tpblite/tpblite.py index c987e49..c99bfd2 100644 --- a/tpblite/tpblite.py +++ b/tpblite/tpblite.py @@ -1,8 +1,15 @@ from .models.torrents import Torrents, Torrent from .models.utils import Query - - +class TPB(object): + + def __init__(self, base_url='https://tpb.party'): + self.base_url = base_url + + def search(self, query, base_url, page=0, order=99, category=0): + webpage = Query(query, base_url, page=0, order=99, category=0) + return Torrents(webpage) + def run(): q = Query('avengers endgame 1080p') print(q.url) |