Renamed pirate_search to torrent_search
This commit is contained in:
@@ -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.
|
||||
|
||||
13
torrentSearch/api_torznab.py
Normal file
13
torrentSearch/api_torznab.py
Normal 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:
|
||||
9
torrentSearch/config.example.ini
Normal file
9
torrentSearch/config.example.ini
Normal 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
|
||||
8
torrentSearch/config.example.py
Normal file
8
torrentSearch/config.example.py
Normal 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
13
torrentSearch/jackett.py
Normal 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)
|
||||
@@ -1,5 +0,0 @@
|
||||
RESULTS_PER_PAGE = 75
|
||||
|
||||
JACKET_HOST = '10.0.0.41'
|
||||
JACKET_PORT = '9117'
|
||||
JACKET_MAX_SEARCH_RESULT = 1000
|
||||
Reference in New Issue
Block a user