But to be clearer and fold any doubt, it must be pasted replacing this?
Código: Seleccionar todo
else:
data = scrapertools.cache_page( page_url )
flashvar_filekey = scrapertools.get_match( data, 'flashvars.filekey=([^;]+);' )
filekey = scrapertools.get_match( data,'var '+ flashvar_filekey + '="([^"]+)"' )
#get stream url from api
url = 'http://www.nowvideo.sx/api/player.api.php?key=%s&file=%s' % ( filekey.replace(".","%2E").replace("-","%2D"), video_id )
data = scrapertools.cache_page( url )
print "##### data 1 ## %s ##" % data
data = scrapertools.get_match( data, 'url=([^\&]+)&' )
data = urllib.quote_plus( data )
url = 'http://www.nowvideo.li/api/player.api.php?cid3=undefined&numOfErrors=1&user=undefined&errorUrl=' + data.replace( ".", "%2E" ) + '&pass=undefined&errorCode=404&cid=1&cid2=undefined&file=' + video_id + '&key=' + filekey.replace( ".", "%2E" ).replace( "-", "%2D" )
data = scrapertools.cache_page( url )
print "##### data 2 ## %s ##" % data
media_url = scrapertools.get_match( data, 'url=([^\&]+)&' )
print "##### media_url ## %s ##" % media_url
video_urls.append( [ scrapertools.get_filename_from_url( media_url )[-4:] + " [nowvideo]", media_url ] )