Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Firsttv extractor doesn't work #9103

Closed
serejk opened this issue Apr 7, 2016 · 0 comments
Closed

Firsttv extractor doesn't work #9103

serejk opened this issue Apr 7, 2016 · 0 comments
Labels

Comments

@serejk
Copy link

@serejk serejk commented Apr 7, 2016

Firsttv provider doesn`t work as for now. Maybe they changed video backend or like that. Anyway, test urls fail to download:

youtube-dl http://www.1tv.ru/videoarchive/73390
[1tv] 73390: Downloading page
ERROR: Unable to extract video URL; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

I has my own code to download that videos from new backend (PHP, i`m not good in Python, unfortunately).

class First
{
    public $title;
    public $link;
    public $url;
    public function __construct($url)
    { 
        $api = 'www.1tv.ru/owa/win/ONE_ONLINE_VIDEOS.archive_single_xml?pid=';

        $tokens = explode('/', $url);
        $pid = end($tokens);
        /* Fix for Urgant show, contains 'p' before pid */
        $pid = ltrim($pid, 'p');

        $item = simplexml_load_string(get($api.$pid))->channel->item;
        $this->title = current($item->title);
        $this->link  = current($item->link);
        if ( false !== $media = $item->children('media', true) ) {
            $this->url = current($media->content->attributes()['url']);
        }
    }

It is in PHP, but idea is pretty clear. Using this video title and direct url can be extracted. For example, for test video above direct link is

http://redirect.1internet.tv/promorolik/2014/02/olimp-DU-20140210-02.mp4

get() function is a simple curl wrapper to download content by url.

@jaimeMF jaimeMF added the broken-IE label Apr 7, 2016
@dstftw dstftw closed this in 61dd350 Apr 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.