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

Code before:
            'uploader': 'cukiajanlo',
            'uploader_id': '83729',
            'timestamp': 1439193826,
            'upload_date': '20150810',
            'duration': 72,
            'age_limit': 0,
            'tags': ['tánc', 'cica', 'cuki', 'cukiajanlo', 'newsroom'],
        },
    }, {
        'url': 'https://embed.indavideo.hu/player/video/3b63bc219c?autostart=1',
        'md5': '8c82244ba85d2a2310275b318eb51eac',
        'info_dict': {
            'id': '1335611',
            'ext': 'mp4',
            'title': 'Vicces cica',
            'description': 'Játszik a tablettel. :D',
            'thumbnail': r're:^https?://.*\.jpg$',
            'uploader': 'Jet_Pack',
            'uploader_id': '491217',
            'timestamp': 1390821212,
            'upload_date': '20140127',
            'duration': 7,
            'age_limit': 0,
            'tags': ['cica', 'Jet_Pack'],
        },
    }, {
        'url': 'https://embed.indavideo.hu/player/video/1bdc3c6d80?autostart=1&hide=1',
        'only_matching': True,
    }, {
        'url': 'https://assets.indavideo.hu/swf/player.swf?v=fe25e500&vID=1bdc3c6d80&autostart=1&hide=1&i=1',
        'only_matching': True,
    }]

    def _real_extract(self, url):
        video_id = self._match_id(url)

        video = self._download_json(
            f'https://amfphp.indavideo.hu/SYm0json.php/player.playerHandler.getVideoData/{video_id}/',
            video_id, query={'_': time_seconds()})['data']

        video_urls = []

        video_files = video.get('video_files')
        if isinstance(video_files, list):
            video_urls.extend(video_files)
        elif isinstance(video_files, dict):
            video_urls.extend(video_files.values())

        video_urls = list(set(video_urls))

        video_prefix = video_urls[0].rsplit('/', 1)[0]

Review comment (refactor):
This is not what https://github.com/yt-dlp/yt-dlp/pull/8129/files#r1328046327 was asking for

Add a new class var, `_WEBPAGE_TESTS`, and move this test to it with its original URL (https://indavideo.hu/video/Vicces_cica_1)

We need to test embed extraction. You can run the test with:
`python test/test_download.py TestDownload.test_IndavideoEmbed_webpage`

Like this:
https://github.com/yt-dlp/yt-dlp/blob/3d2623a898196640f7cc0fc8b70118ff19e6925d/yt_dlp/extractor/slideslive.py#L329-L346


Code after:
            'uploader': 'cukiajanlo',
            'uploader_id': '83729',
            'timestamp': 1439193826,
            'upload_date': '20150810',
            'duration': 72,
            'age_limit': 0,
            'tags': ['tánc', 'cica', 'cuki', 'cukiajanlo', 'newsroom'],
        },
    }, {
        'url': 'https://embed.indavideo.hu/player/video/1bdc3c6d80?autostart=1&hide=1',
        'only_matching': True,
    }]
    _WEBPAGE_TESTS = [{
        'url': 'https://indavideo.hu/video/Vicces_cica_1',
        'info_dict': {
            'id': '1335611',
            'ext': 'mp4',
            'title': 'Vicces cica',
            'description': 'Játszik a tablettel. :D',
            'thumbnail': r're:^https?://.*\.jpg$',
            'uploader': 'Jet_Pack',
            'uploader_id': '491217',
            'timestamp': 1390821212,
            'upload_date': '20140127',
            'duration': 7,
            'age_limit': 0,
            'tags': ['cica', 'Jet_Pack'],
        },
    }]

    def _real_extract(self, url):
        video_id = self._match_id(url)

        video = self._download_json(
            f'https://amfphp.indavideo.hu/SYm0json.php/player.playerHandler.getVideoData/{video_id}/',
            video_id, query={'_': time_seconds()})['data']

        video_urls = []

        video_files = video.get('video_files')
        if isinstance(video_files, list):
            video_urls.extend(video_files)
        elif isinstance(video_files, dict):
            video_urls.extend(video_files.values())

        video_urls = list(set(video_urls))

        filesh = video.get('filesh') or {}

        formats = []
        for video_url in video_urls: