Renamed pirate_search to torrent_search

This commit is contained in:
2017-11-01 16:09:06 +01:00
parent 736fefbcad
commit c1c1ca3ad4
10 changed files with 44 additions and 6 deletions

View File

@@ -1,4 +1,4 @@
# Pirate Search
# Torrent Search
## Torznab
This is one of our ways we index torrents. We use jackett's torznab indexing to seach for multiple indexers at once.

View File

@@ -0,0 +1,13 @@
def build_api_url():
base_url = app.config['JACKET_HOST']
base_port = app.config['JACKET_PORT']
def call_jackett_api():
base_url = app.config['JACKET_HOST']
base_port = app.config['JACKET_PORT']
base_p
def handle_request_by_args(query, mode=None):
apikey = api:

View File

@@ -0,0 +1,9 @@
[DEFAULT]
[JACKETT]
JACKETT_HOST = '10.0.0.41'
JACKETT_PORT = 9117
JACKETT_MAX_SEARCH_RESULT = 1000
JACKETT_SSL = False
RESULTS_PER_PAGE = 75

View File

@@ -0,0 +1,8 @@
[DEFAULT]
[JACKETT]
JACKETT_HOST = '10.0.0.41'
JACKETT_PORT = '9117'
JACKETT_MAX_SEARCH_RESULT = 1000
RESULTS_PER_PAGE = 75

13
torrentSearch/jackett.py Normal file
View File

@@ -0,0 +1,13 @@
class Jackett(object):
"""docstring for Jackett"""
def __init__(self, url, query, apikey, limit):
super(Jackett, self).__init__()
self.url = url
self.query = query
self.apikey = apikey
self.limit = limit
@classmethod
def build_search_url(url, query, apikey, limit):
return cls(url, query, apikey, limit)

View File

View File

@@ -1,5 +0,0 @@
RESULTS_PER_PAGE = 75
JACKET_HOST = '10.0.0.41'
JACKET_PORT = '9117'
JACKET_MAX_SEARCH_RESULT = 1000