Adjust RaiPlayLive too - pkgsrc-localpatches - leot's pkgsrc LOCALPATCHES
 (HTM) hg clone https://bitbucket.org/iamleot/pkgsrc-localpatches
 (DIR) Log
 (DIR) Files
 (DIR) Refs
       ---
 (DIR) changeset fbcbccb8cb3b7b3b7d59754cd26d71e87f3584fd
 (DIR) parent c34f3c27681a61a7125e35e546dce8000222031e
 (HTM) Author: Leonardo Taccari <iamleot@gmail.com>
       Date:   Sun, 10 Nov 2019 10:18:02 
       
       Adjust RaiPlayLive too
       
       Diffstat:
        net/youtube-dl/patch-youtube__dl_extractor_rai.py |  58 ++++++++++++++++++++++-
        1 files changed, 56 insertions(+), 2 deletions(-)
       ---
       diff -r c34f3c27681a -r fbcbccb8cb3b net/youtube-dl/patch-youtube__dl_extractor_rai.py
       --- a/net/youtube-dl/patch-youtube__dl_extractor_rai.py Sun Nov 03 23:30:18 2019 +0100
       +++ b/net/youtube-dl/patch-youtube__dl_extractor_rai.py Sun Nov 10 10:18:02 2019 +0100
       @@ -1,9 +1,9 @@
        $NetBSD$
        
        Preliminary workaround for raiplay.it updates... Only RaiPlay
       -extractor was analyzed and adjusted.
       +and RaiPlayLive were analyzed and adjusted.
        
       ---- youtube_dl/extractor/rai.py.orig
       +--- youtube_dl/extractor/rai.py.orig   2019-11-10 08:50:05.552567084 +0000
        +++ youtube_dl/extractor/rai.py
        @@ -124,39 +124,17 @@ class RaiBaseIE(InfoExtractor):
         class RaiPlayIE(RaiBaseIE):
       @@ -73,3 +73,57 @@
                             })
         
                 timestamp = unified_timestamp(try_get(
       +@@ -225,7 +203,7 @@ class RaiPlayLiveIE(RaiBaseIE):
       +             'display_id': 'rainews24',
       +             'ext': 'mp4',
       +             'title': 're:^Diretta di Rai News 24 [0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}$',
       +-            'description': 'md5:6eca31500550f9376819f174e5644754',
       ++            'description': 'md5:4d00bcf6dc98b27c6ec480de329d1497',
       +             'uploader': 'Rai News 24',
       +             'creator': 'Rai News 24',
       +             'is_live': True,
       +@@ -236,22 +214,34 @@ class RaiPlayLiveIE(RaiBaseIE):
       +     }
       + 
       +     def _real_extract(self, url):
       +-        display_id = self._match_id(url)
       ++        mobj = re.match(self._VALID_URL, url)
       ++        display_id = mobj.group('id')
       + 
       +-        webpage = self._download_webpage(url, display_id)
       ++        media = self._download_json(
       ++            '%s.json' % url, display_id, 'Downloading channel JSON')
       ++
       ++        title = media['name']
       ++        video = media['video']
       ++        video_id = media['id'].replace('ContentItem-', '')
       ++
       ++        relinker_info = self._extract_relinker_info(video['content_url'], video_id)
       ++        self._sort_formats(relinker_info['formats'])
       + 
       +-        video_id = self._search_regex(
       +-            r'data-uniquename=["\']ContentItem-(%s)' % RaiBaseIE._UUID_RE,
       +-            webpage, 'content id')
       +-
       +-        return {
       +-            '_type': 'url_transparent',
       +-            'ie_key': RaiPlayIE.ie_key(),
       +-            'url': 'http://www.raiplay.it/dirette/ContentItem-%s.html' % video_id,
       ++        info = {
       +             'id': video_id,
       +             'display_id': display_id,
       ++            'title': self._live_title(title) if relinker_info.get(
       ++                'is_live') else title,
       ++            'alt_title': media.get('subtitle'),
       ++            'description': media.get('description'),
       ++            'uploader': strip_or_none(media.get('channel')),
       ++            'creator': strip_or_none(media.get('editor')),
       ++            'duration': parse_duration(video.get('duration')),
       +         }
       + 
       ++        info.update(relinker_info)
       ++        return info
       ++
       + 
       + class RaiPlayPlaylistIE(InfoExtractor):
       +     _VALID_URL = r'https?://(?:www\.)?raiplay\.it/programmi/(?P<id>[^/?#&]+)'