|
|
@ -1,7 +1,6 @@ |
|
|
|
from datetime import datetime |
|
|
|
from couchpotato.core.helpers.variable import tryInt |
|
|
|
from couchpotato.core.helpers.variable import tryInt, getIdentifier |
|
|
|
from couchpotato.core.logger import CPLog |
|
|
|
from couchpotato.core.helpers.variable import getTitle |
|
|
|
from couchpotato.core.media._base.providers.torrent.base import TorrentMagnetProvider |
|
|
|
import random |
|
|
|
|
|
|
@ -19,7 +18,7 @@ class Base(TorrentMagnetProvider): |
|
|
|
def _search(self, movie, quality, results): |
|
|
|
limit = 10 |
|
|
|
page = 1 |
|
|
|
data = self.getJsonData(self.urls['search'] % (getTitle(movie), limit, page)) |
|
|
|
data = self.getJsonData(self.urls['search'] % (getIdentifier(movie), limit, page)) |
|
|
|
|
|
|
|
if data: |
|
|
|
movie_count = tryInt(data['data']['movie_count']) |
|
|
@ -32,11 +31,6 @@ class Base(TorrentMagnetProvider): |
|
|
|
for i in range(0,len(movie_results)): |
|
|
|
result = data['data']['movies'][i] |
|
|
|
name = result['title'] |
|
|
|
|
|
|
|
t = movie['info']['original_title'].split(' ') |
|
|
|
|
|
|
|
if all(word in name for word in t) and movie['info']['year'] == result['year']: |
|
|
|
|
|
|
|
year = result['year'] |
|
|
|
detail_url = result['url'] |
|
|
|
|
|
|
|