Repository: yt-dlp/yt-dlp
File: yt_dlp/extractor/rtve.py (Python)

Code before:
                yield quality_str, url
            encrypted_data.read(4)  # CRC

    @staticmethod
    def _get_url(alphabet, url_data):
        url = ''
        f = 0
        e = 3
        b = 1
        for letter in url_data.decode('iso-8859-1'):
            if f == 0:
                l = int(letter) * 10
                f = 1
            else:
                if e == 0:
                    l += int(letter)
                    url += alphabet[l]
                    e = (b + 3) % 4
                    f = 0
                    b += 1
                else:
                    e -= 1
        return url

    @staticmethod
    def _get_alfabet(alphabet_data):
        alphabet = []
        e = 0
        d = 0
        for l in alphabet_data.decode('iso-8859-1'):
            if d == 0:
                alphabet.append(l)
                d = e = (e + 1) % 4
            else:
                d -= 1
        return alphabet

    def _extract_png_formats(self, video_id):
        formats = []
        q = qualities(['Media', 'Alta', 'HQ', 'HD_READY', 'HD_FULL'])
        for manager in (self._manager, 'rtveplayw'):
            png = self._download_webpage(
                f'http://www.rtve.es/ztnr/movil/thumbnail/{manager}/videos/{video_id}.png',
                video_id, 'Downloading url information', query={'q': 'v2'})

            for quality, video_url in self._decrypt_url(png):
                ext = determine_ext(video_url)
                if ext == 'm3u8':
                    formats.extend(self._extract_m3u8_formats(
                        video_url, video_id, 'mp4', 'm3u8_native',
                        m3u8_id='hls', fatal=False))

Review comment (suggestion):
Let's keep the code english
```suggestion
    def _get_alphabet(alphabet_data):
```

Code after:
            'timestamp': ('dateOfEmission', {parse_iso8601(delimiter=' ')}),
            'release_timestamp': ('publicationDate', {parse_iso8601(delimiter=' ')}),
            'modified_timestamp': ('modificationDate', {parse_iso8601(delimiter=' ')}),
            'thumbnail': (('thumbnail', 'image', 'imageSEO'), {url_or_none}, any),
            'duration': ('duration', {float_or_none(scale=1000)}),
            'is_live': ('live', {bool}),
            'series': (('programTitle', ('programInfo', 'title')), {clean_html}, any),
        })


class RTVEALaCartaIE(RTVEBaseIE):
    IE_NAME = 'rtve.es:alacarta'
    IE_DESC = 'RTVE a la carta and Play'
    _VALID_URL = [
        r'https?://(?:www\.)?rtve\.es/(?:m/)?(?:(?:alacarta|play)/videos|filmoteca)/(?!directo)(?:[^/?#]+/){2}(?P<id>\d+)',
        r'https?://(?:www\.)?rtve\.es/infantil/serie/[^/?#]+/video/[^/?#]+/(?P<id>\d+)',
    ]

    _TESTS = [{
        'url': 'http://www.rtve.es/alacarta/videos/la-aventura-del-saber/aventuraentornosilla/3088905/',
        'md5': 'a964547824359a5753aef09d79fe984b',
        'info_dict': {
            'id': '3088905',
            'ext': 'mp4',
            'title': 'En torno a la silla',
            'duration': 1216.981,
            'series': 'La aventura del Saber',
            'thumbnail': 'https://img2.rtve.es/v/aventuraentornosilla_3088905.png',
        },
    }, {
        'note': 'Live stream',
        'url': 'http://www.rtve.es/alacarta/videos/television/24h-live/1694255/',
        'info_dict': {
            'id': '1694255',
            'ext': 'mp4',
            'title': 're:^24H LIVE [0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}$',
            'is_live': True,
            'live_status': 'is_live',
            'thumbnail': r're:https://img2\.rtve\.es/v/.*\.png',
        },
        'params': {
            'skip_download': 'live stream',
        },
    }, {
        'url': 'http://www.rtve.es/alacarta/videos/servir-y-proteger/servir-proteger-capitulo-104/4236788/',
        'md5': 'f3cf0d1902d008c48c793e736706c174',
        'info_dict': {
            'id': '4236788',
            'ext': 'mp4',
            'title': 'Episodio 104',
            'duration': 3222.8,