Ejemplo n.º 1
0
def get_packed_data(html):
    packed_data = ''
    for match in re.finditer(r'(eval\s*\(function.*?)</script>', html, re.DOTALL | re.I):
        if jsunpack.detect(match.group(1)):
            packed_data += jsunpack.unpack(match.group(1))

    return packed_data
Ejemplo n.º 2
0
 def __method5(self, response):
     ''' http://videobug.se/vid/pVobcNozEWmTkarNnwX06w
     '''
     html = response.content
     streams = []
     if jsunpack.detect(html):
         streams = self._extract_streams(jsunpack.unpack(html))
     return streams
Ejemplo n.º 3
0
 def get_media_url(self, host, media_id):
     web_url = self.get_url(host, media_id)
     headers = {'User-Agent': common.FF_USER_AGENT, 'Referer': web_url}
     html = self.net.http_GET(web_url, headers=headers).content
     js = re.compile('<script[^>]+>(eval.*?)</sc', re.DOTALL | re.IGNORECASE).search(html).group(1)
     if jsunpack.detect(js):
         html += jsunpack.unpack(js)
     if html:
         source = re.search(',"(http.*?mp4)"', html, re.I)
         if source:
             return source.group(1) + helpers.append_headers(headers)        
     raise ResolverError('Video not found')
Ejemplo n.º 4
0
 def get_media_url(self, host, media_id):
     web_url = self.get_url(host, media_id)
     headers = {'User-Agent': common.FF_USER_AGENT, 'Referer': web_url}
     html = self.net.http_GET(web_url, headers=headers).content
     js = re.compile('<script[^>]+>(eval.*?)</sc',
                     re.DOTALL | re.IGNORECASE).search(html).group(1)
     if jsunpack.detect(js):
         html += jsunpack.unpack(js)
     if html:
         source = re.search(',"(http.*?mp4)"', html, re.I)
         if source:
             return source.group(1) + helpers.append_headers(headers)
     raise ResolverError('Video not found')