def get_download_link(self, source, source_id, referrer): """ Obtain the download link for the specified source """ source_params = {'key': source_id, 'host': source, 'vars':''} result = self.ajax_request(MEDIA_SOURCE_URL, source_params, referrer) return remove_bom(result.strip())
def get_download_link(self, item_id, kind, source_url, source, definition, audio, referer): """ Obtain the download link for the specified source """ source_params = {'id':item_id, 'def':definition, 'audio':audio, 'host':source, 'tipo':kind} result = self.ajax_request(source_url, source_params, referer) result = urllib.unquote(result).replace('play2?megaurl=', '') match = re.search('(.*)&id', result) if (match and match.group(1)): result = match.group(1) return remove_bom(result.strip())