Commit f4d8b203 authored by thuban's avatar thuban

bugfix si omdb indisponible + alphareign en défaut

parent 0dbf6822
......@@ -26,7 +26,7 @@ else:
import locale
def search2html(keywords, extrawords=' ', searchengine='kickasstorrents', page=0, isserie=0):
def search2html(keywords, extrawords=' ', searchengine='alphareign', page=0, isserie=0):
"""
Show search result
......
......@@ -55,7 +55,7 @@ progversion = 1.9
defaultconf = {'startperc': 7,
'uplimit': 20,
'downlimit': -1,
'searchengine': 'kickasstorrents',
'searchengine': 'alphareign',
'proxy_type': 'none',
'proxy_hostname': '',
'proxy_username': '',
......
......@@ -48,7 +48,7 @@ def do_req_get(url, ret, keys=None, headers=None):
class OMDBbAPI:
"""Search on The Open Movie Database"""
URL = "http://www.omdbapi.com/"
URL = "https://www.omdbapi.com/"
def __init__(self):
pass
......@@ -84,7 +84,8 @@ def omdb_sch(sch, serie=False):
results = []
title, year, posterurl = "", "", ""
search_omdb = OMDBbAPI.search_any(sch)
if not 'Response' in search_omdb.keys():
return {}
if search_omdb['Response']:
if 'Search' in search_omdb:
for res in search_omdb['Search']:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment