parent
30364b4ac4
commit
876d668c87
@ -15,8 +15,7 @@ class YggTorrent(ConnectorCore):
|
|||||||
color = 'is-success'
|
color = 'is-success'
|
||||||
title = 'YggTorrent'
|
title = 'YggTorrent'
|
||||||
favicon = 'yggtorrent.png'
|
favicon = 'yggtorrent.png'
|
||||||
base_url = 'https://%s' % YGG_DOMAIN
|
base_url = 'https://%s' % YGG_DOMAIN if not YGG_IP else 'http://%s' % YGG_IP
|
||||||
hidden_url = 'http://%s' % YGG_IP
|
|
||||||
is_light = False
|
is_light = False
|
||||||
category = 2179
|
category = 2179
|
||||||
|
|
||||||
@ -38,14 +37,9 @@ class YggTorrent(ConnectorCore):
|
|||||||
@ConnectorCache.cache_data
|
@ConnectorCache.cache_data
|
||||||
def search(self):
|
def search(self):
|
||||||
if self.category:
|
if self.category:
|
||||||
if YGG_IP:
|
response = curl_content(
|
||||||
params = self.get_full_search_url().split('?')
|
self.get_full_search_url(), custom_host=YGG_DOMAIN if YGG_IP else None
|
||||||
response = curl_content(
|
)
|
||||||
'%s/engine/search?%s' % (self.hidden_url, params[1]),
|
|
||||||
headers={"Host": YGG_DOMAIN},
|
|
||||||
)
|
|
||||||
else:
|
|
||||||
response = curl_content(self.get_full_search_url())
|
|
||||||
|
|
||||||
if response['http_code'] == 200:
|
if response['http_code'] == 200:
|
||||||
html = BeautifulSoup(response['output'], 'html.parser')
|
html = BeautifulSoup(response['output'], 'html.parser')
|
||||||
|
Reference in New Issue
Block a user