#VERSION: 1.3 #AUTHORS: hoanns, nindogo # movie and tv show site # Will only parse the first search result site, sorry # tv and movie category will not be differentiated import re import threading # qBt from novaprinter import prettyPrinter from helpers import retrieve_url # noinspection PyPep8Naming class mkvcage(object): url = "https://www.mkvcage.ws" name = "MkvCage" supported_categories = {'all': True, 'movies': True, 'tv': True} games_to_parse = 10 result_page_match = re.compile(r'

File\sSize:\s(.*?)((.+)<\/title>') dl = dl_match.findall(data)[0].replace('|','').replace('\r','') except IndexError: return try: magnet_match = re.compile(r'href="magnet:\?xt=urn:btih(.+)">MAGNET', re.I) ln = r'magnet:?xt=urn:btih' + magnet_match.findall(data)[0] + '&dn=' + dl except IndexError: ln_match = re.compile(r'href="\/torrents(.+)\.torrent"', re.I) ln = self.url + '/torrents' + ln_match.findall(data)[0] + '.torrent' result = { 'name': dl, 'size': size, 'link': ln, 'desc_link': url, 'seeds': -1, 'leech': -1, 'engine_url': self.url } prettyPrinter(result) quit() def search(self, what, cat='all'): num_pages_match = re.compile(r'
  • …<\/li>\n