ronantakizawa/codereview-bench huggingface dataset:
Repository: yt-dlp/yt-dlp
File: yt_dlp/extractor/newspicks.py (Python)

Code before:
            'thumbnail': r're:https?://resources\.newspicks\.com/.+\.(?:jpe?g|png)',
            'timestamp': 1719086400,
            'upload_date': '20240622',
        },
    }]

    def _real_extract(self, url):
        series_id = self._match_id(url)
        video_id = traverse_obj(parse_qs(url), ('movieId', -1, {str}, {require('movie ID')}))
        webpage = self._download_webpage(url, video_id)

        fragment = self._search_nextjs_data(webpage, video_id)['props']['pageProps']['fragment']
        m3u8_url = traverse_obj(fragment, ('movie', 'movieUrl', {url_or_none}, {require('m3u8 URL')}))
        formats, subtitles = self._extract_m3u8_formats_and_subtitles(m3u8_url, video_id, 'mp4')

        return {
            'id': video_id,
            'formats': formats,
            'series': traverse_obj(fragment, ('series', 'title', {str})),
            'series_id': series_id,
            'subtitles': subtitles,
            **traverse_obj(fragment, ('movie', {
                'title': ('title', {str}),
                'cast': ('relatedUsers', ..., 'displayName', {str}, filter, all, filter),
                'description': ('explanation', {clean_html}),
                'duration': ('duration', {int_or_none(invscale=60)}),
                'release_timestamp': ('onAirStartDate', {parse_iso8601}),
                'thumbnail': (('image', 'coverImageUrl'), {url_or_none}, any),
                'timestamp': ('published', {parse_iso8601}),
            })),
        }


Review comment (refactor):
If the provided `duration` is only accurate to the minute (rather than the second), then it's not worth extracting IMO, since such an inaccurate duration could potentially cause problems with postprocessing.
```suggestion
```

Code after:
            'timestamp': 1719086400,
            'upload_date': '20240622',
        },
    }]

    def _real_extract(self, url):
        series_id = self._match_id(url)
        video_id = traverse_obj(parse_qs(url), ('movieId', -1, {str}, {require('movie ID')}))
        webpage = self._download_webpage(url, video_id)

        fragment = self._search_nextjs_data(webpage, video_id)['props']['pageProps']['fragment']
        m3u8_url = traverse_obj(fragment, ('movie', 'movieUrl', {url_or_none}, {require('m3u8 URL')}))
        formats, subtitles = self._extract_m3u8_formats_and_subtitles(m3u8_url, video_id, 'mp4')

        return {
            'id': video_id,
            'formats': formats,
            'series': traverse_obj(fragment, ('series', 'title', {str})),
            'series_id': series_id,
            'subtitles': subtitles,
            **traverse_obj(fragment, ('movie', {
                'title': ('title', {str}),
                'cast': ('relatedUsers', ..., 'displayName', {str}, filter, all, filter),
                'description': ('explanation', {clean_html}),
                'release_timestamp': ('onAirStartDate', {parse_iso8601}),
                'thumbnail': (('image', 'coverImageUrl'), {url_or_none}, any),
                'timestamp': ('published', {parse_iso8601}),
            })),
        }
Repository: yt-dlp/yt-dlp
File: yt_dlp/extractor/youtube/_base.py (Python)

Code before:
    str_to_int,
    traverse_obj,
    try_call,
    try_get,
    unified_timestamp,
    url_or_none,
    variadic,
)


class _PoTokenContext(enum.Enum):
    PLAYER = 'player'
    GVS = 'gvs'
    SUBS = 'subs'


class StreamingProtocol(enum.Enum):
    HTTPS = 'https'
    DASH = 'dash'
    HLS = 'hls'


@dataclasses.dataclass
class BasePoTokenPolicy:
    required: bool = False
    # Try fetch a PO Token even if it is not required.
    recommended: bool = False
    not_required_for_premium: bool = False


@dataclasses.dataclass
class GvsPoTokenPolicy(BasePoTokenPolicy):
    not_required_with_player_token: bool = False


@dataclasses.dataclass
class PlayerPoTokenPolicy(BasePoTokenPolicy):
    pass


@dataclasses.dataclass
class SubsPoTokenPolicy(BasePoTokenPolicy):
    pass


WEB_PO_TOKEN_POLICIES = {
    'GVS_PO_TOKEN_POLICY': {
        StreamingProtocol.HTTPS: GvsPoTokenPolicy(
            required=True,
            recommended=True,
            not_required_for_premium=True,

Review comment (suggestion):
```suggestion
    # Try to fetch a PO Token even if it is not required.
```

Code after:
    str_to_int,
    traverse_obj,
    try_call,
    try_get,
    unified_timestamp,
    url_or_none,
    variadic,
)


class _PoTokenContext(enum.Enum):
    PLAYER = 'player'
    GVS = 'gvs'
    SUBS = 'subs'


class StreamingProtocol(enum.Enum):
    HTTPS = 'https'
    DASH = 'dash'
    HLS = 'hls'


@dataclasses.dataclass
class BasePoTokenPolicy:
    required: bool = False
    # Try to fetch a PO Token even if it is not required.
    recommended: bool = False
    not_required_for_premium: bool = False


@dataclasses.dataclass
class GvsPoTokenPolicy(BasePoTokenPolicy):
    not_required_with_player_token: bool = False


@dataclasses.dataclass
class PlayerPoTokenPolicy(BasePoTokenPolicy):
    pass


@dataclasses.dataclass
class SubsPoTokenPolicy(BasePoTokenPolicy):
    pass


WEB_PO_TOKEN_POLICIES = {
    'GVS_PO_TOKEN_POLICY': {
        StreamingProtocol.HTTPS: GvsPoTokenPolicy(
            required=True,
            recommended=True,
            not_required_for_premium=True,
Repository: yt-dlp/yt-dlp
File: yt_dlp/extractor/mir24tv.py (Python)

Code before:
import urllib
from .common import InfoExtractor
from ..utils import (
    ExtractorError,
    filter_dict,
    unsmuggle_url,
)

class Mir24tvIE(InfoExtractor):
    _VALID_URL = r'https?://(?:www\.)?mir24\.tv/news/(?P<id>[0-9]+)/[^/?#]+'
    _BASE_URL = 'https://mir24.tv'
    _HEADERS = {
        'Origin': _BASE_URL,
        'Referer': f'{_BASE_URL}/',
    }
    _TESTS = [{
        'url': 'https://mir24.tv/news/16635210/dni-kultury-rossii-otkrylis-v-uzbekistane.-na-prazdnichnom-koncerte-vystupili-zvezdy-rossijskoj-estrada',
        'info_dict': {
            'id': '16635210',
            'title': 'Дни культуры России открылись в Узбекистане. На праздничном концерте выступили звезды российской эстрады',
            'ext': 'mp4',
        },
        'params': {'skip_download': True},
    }]
    _IMPERSONATE_TARGET = True

    def _real_extract(self, url):

Review comment (refactor):
we won't need `urllib` if we use `yt_dlp.utils.parse_qs` instead
```suggestion
from .common import InfoExtractor
```

Code after:
from .common import InfoExtractor
from ..utils import parse_qs, url_or_none
from ..utils.traversal import require, traverse_obj


class Mir24TvIE(InfoExtractor):
    IE_NAME = 'mir24.tv'
    _VALID_URL = r'https?://(?:www\.)?mir24\.tv/news/(?P<id>[0-9]+)/[^/?#]+'
    _TESTS = [{
        'url': 'https://mir24.tv/news/16635210/dni-kultury-rossii-otkrylis-v-uzbekistane.-na-prazdnichnom-koncerte-vystupili-zvezdy-rossijskoj-estrada',
        'info_dict': {
            'id': '16635210',
            'title': 'Дни культуры России открылись в Узбекистане. На праздничном концерте выступили звезды российской эстрады',
            'ext': 'mp4',
            'thumbnail': r're:https://images\.mir24\.tv/.+\.jpg',
        },
    }]

    def _real_extract(self, url):
        video_id = self._match_id(url)
        webpage = self._download_webpage(url, video_id, impersonate=True)

        iframe_url = self._search_regex(
            r'<iframe\b[^>]+\bsrc=["\'](https?://mir24\.tv/players/[^"\']+)',
            webpage, 'iframe URL')

        m3u8_url = traverse_obj(iframe_url, (
Repository: yt-dlp/yt-dlp
File: yt_dlp/extractor/mir24tv.py (Python)

Code before:
import urllib
from .common import InfoExtractor
from ..utils import (
    ExtractorError,
    filter_dict,
    unsmuggle_url,
)

class Mir24tvIE(InfoExtractor):
    _VALID_URL = r'https?://(?:www\.)?mir24\.tv/news/(?P<id>[0-9]+)/[^/?#]+'
    _BASE_URL = 'https://mir24.tv'
    _HEADERS = {
        'Origin': _BASE_URL,
        'Referer': f'{_BASE_URL}/',
    }
    _TESTS = [{
        'url': 'https://mir24.tv/news/16635210/dni-kultury-rossii-otkrylis-v-uzbekistane.-na-prazdnichnom-koncerte-vystupili-zvezdy-rossijskoj-estrada',
        'info_dict': {
            'id': '16635210',
            'title': 'Дни культуры России открылись в Узбекистане. На праздничном концерте выступили звезды российской эстрады',
            'ext': 'mp4',
        },
        'params': {'skip_download': True},
    }]
    _IMPERSONATE_TARGET = True

    def _real_extract(self, url):
        video_id = self._match_id(url)
        url, smuggled_data = unsmuggle_url(url, {})
        impersonate = self._configuration_arg('impersonate', [''])
        try:
            webpage = self._request_webpage(url, video_id, headers=filter_dict({

Review comment (suggestion):
if my other suggestions are applied, we'll need these instead:
```suggestion
from ..utils import parse_qs, url_or_none
from ..utils.traversal import require, traverse_obj
```

Code after:
from .common import InfoExtractor
from ..utils import parse_qs, url_or_none
from ..utils.traversal import require, traverse_obj


class Mir24TvIE(InfoExtractor):
    IE_NAME = 'mir24.tv'
    _VALID_URL = r'https?://(?:www\.)?mir24\.tv/news/(?P<id>[0-9]+)/[^/?#]+'
    _TESTS = [{
        'url': 'https://mir24.tv/news/16635210/dni-kultury-rossii-otkrylis-v-uzbekistane.-na-prazdnichnom-koncerte-vystupili-zvezdy-rossijskoj-estrada',
        'info_dict': {
            'id': '16635210',
            'title': 'Дни культуры России открылись в Узбекистане. На праздничном концерте выступили звезды российской эстрады',
            'ext': 'mp4',
            'thumbnail': r're:https://images\.mir24\.tv/.+\.jpg',
        },
    }]

    def _real_extract(self, url):
        video_id = self._match_id(url)
        webpage = self._download_webpage(url, video_id, impersonate=True)

        iframe_url = self._search_regex(
            r'<iframe\b[^>]+\bsrc=["\'](https?://mir24\.tv/players/[^"\']+)',
            webpage, 'iframe URL')

        m3u8_url = traverse_obj(iframe_url, (
            {parse_qs}, 'source', -1, {self._proto_relative_url}, {url_or_none}, {require('m3u8 URL')}))
        formats, subtitles = self._extract_m3u8_formats_and_subtitles(m3u8_url, video_id, 'mp4', m3u8_id='hls')

        return {
            'id': video_id,
Repository: yt-dlp/yt-dlp
File: yt_dlp/extractor/mir24tv.py (Python)

Code before:
from .common import InfoExtractor
from ..utils import parse_qs, url_or_none
from ..utils.traversal import require, traverse_obj

class Mir24tvIE(InfoExtractor):
    _VALID_URL = r'https?://(?:www\.)?mir24\.tv/news/(?P<id>[0-9]+)/[^/?#]+'
    _TESTS = [{
        'url': 'https://mir24.tv/news/16635210/dni-kultury-rossii-otkrylis-v-uzbekistane.-na-prazdnichnom-koncerte-vystupili-zvezdy-rossijskoj-estrada',
        'info_dict': {
            'id': '16635210',
            'title': 'Дни культуры России открылись в Узбекистане. На праздничном концерте выступили звезды российской эстрады',
            'ext': 'mp4',
        },
        'params': {'skip_download': True},
    }]

    def _real_extract(self, url):
        video_id = self._match_id(url)
        webpage = self._download_webpage(url, video_id, impersonate=True)

        iframe_url = self._search_regex(
            r'<iframe\b[^>]+\bsrc=["\'](https?://mir24\.tv/players/[^"\']+)',
            webpage, 'iframe URL')

        m3u8_url = traverse_obj(iframe_url, (
            {parse_qs}, 'source', -1, {self._proto_relative_url}, {url_or_none}, {require('m3u8 URL')}))

        return {
            'id': video_id,
            'title': self._og_search_title(webpage, default=None) or self._html_extract_title(webpage),

Review comment (refactor):
```suggestion


class Mir24tvIE(InfoExtractor):
```

Code after:
from .common import InfoExtractor
from ..utils import parse_qs, url_or_none
from ..utils.traversal import require, traverse_obj


class Mir24TvIE(InfoExtractor):
    IE_NAME = 'mir24.tv'
    _VALID_URL = r'https?://(?:www\.)?mir24\.tv/news/(?P<id>[0-9]+)/[^/?#]+'
    _TESTS = [{
        'url': 'https://mir24.tv/news/16635210/dni-kultury-rossii-otkrylis-v-uzbekistane.-na-prazdnichnom-koncerte-vystupili-zvezdy-rossijskoj-estrada',
        'info_dict': {
            'id': '16635210',
            'title': 'Дни культуры России открылись в Узбекистане. На праздничном концерте выступили звезды российской эстрады',
            'ext': 'mp4',
            'thumbnail': r're:https://images\.mir24\.tv/.+\.jpg',
        },
    }]

    def _real_extract(self, url):
        video_id = self._match_id(url)
        webpage = self._download_webpage(url, video_id, impersonate=True)

        iframe_url = self._search_regex(
            r'<iframe\b[^>]+\bsrc=["\'](https?://mir24\.tv/players/[^"\']+)',
            webpage, 'iframe URL')

        m3u8_url = traverse_obj(iframe_url, (
            {parse_qs}, 'source', -1, {self._proto_relative_url}, {url_or_none}, {require('m3u8 URL')}))
        formats, subtitles = self._extract_m3u8_formats_and_subtitles(m3u8_url, video_id, 'mp4', m3u8_id='hls')
Repository: yt-dlp/yt-dlp
File: yt_dlp/extractor/mir24tv.py (Python)

Code before:
class Mir24tvIE(InfoExtractor):
    _VALID_URL = r'https?://(?:www\.)?mir24\.tv/news/(?P<id>[0-9]+)/[^/?#]+'
    _TESTS = [{
        'url': 'https://mir24.tv/news/16635210/dni-kultury-rossii-otkrylis-v-uzbekistane.-na-prazdnichnom-koncerte-vystupili-zvezdy-rossijskoj-estrada',
        'info_dict': {
            'id': '16635210',
            'title': 'Дни культуры России открылись в Узбекистане. На праздничном концерте выступили звезды российской эстрады',
            'ext': 'mp4',
        },
    }]

    def _real_extract(self, url):
        video_id = self._match_id(url)
        webpage = self._download_webpage(url, video_id, impersonate=True)

        iframe_url = self._search_regex(
            r'<iframe\b[^>]+\bsrc=["\'](https?://mir24\.tv/players/[^"\']+)',
            webpage, 'iframe URL')

        m3u8_url = traverse_obj(iframe_url, (
            {parse_qs}, 'source', -1, {self._proto_relative_url}, {url_or_none}, {require('m3u8 URL')}))

        return {
            'id': video_id,
            'title': self._og_search_title(webpage, default=None) or self._html_extract_title(webpage),
            'thumbnail': self._html_search_meta('og:image', webpage),
            'formats': self._extract_m3u8_formats(m3u8_url, video_id, 'mp4'),
        }


Review comment (suggestion):
```suggestion
            'thumbnail': self._og_search_thumbnail(webpage, default=None),
```

Code after:
class Mir24TvIE(InfoExtractor):
    IE_NAME = 'mir24.tv'
    _VALID_URL = r'https?://(?:www\.)?mir24\.tv/news/(?P<id>[0-9]+)/[^/?#]+'
    _TESTS = [{
        'url': 'https://mir24.tv/news/16635210/dni-kultury-rossii-otkrylis-v-uzbekistane.-na-prazdnichnom-koncerte-vystupili-zvezdy-rossijskoj-estrada',
        'info_dict': {
            'id': '16635210',
            'title': 'Дни культуры России открылись в Узбекистане. На праздничном концерте выступили звезды российской эстрады',
            'ext': 'mp4',
            'thumbnail': r're:https://images\.mir24\.tv/.+\.jpg',
        },
    }]

    def _real_extract(self, url):
        video_id = self._match_id(url)
        webpage = self._download_webpage(url, video_id, impersonate=True)

        iframe_url = self._search_regex(
            r'<iframe\b[^>]+\bsrc=["\'](https?://mir24\.tv/players/[^"\']+)',
            webpage, 'iframe URL')

        m3u8_url = traverse_obj(iframe_url, (
            {parse_qs}, 'source', -1, {self._proto_relative_url}, {url_or_none}, {require('m3u8 URL')}))
        formats, subtitles = self._extract_m3u8_formats_and_subtitles(m3u8_url, video_id, 'mp4', m3u8_id='hls')

        return {
            'id': video_id,
            'title': self._og_search_title(webpage, default=None) or self._html_extract_title(webpage),
            'thumbnail': self._og_search_thumbnail(webpage, default=None),
            'formats': formats,
            'subtitles': subtitles,
        }
Repository: yt-dlp/yt-dlp
File: yt_dlp/extractor/mir24tv.py (Python)

Code before:
from .common import InfoExtractor
from ..utils import parse_qs, url_or_none
from ..utils.traversal import require, traverse_obj


class Mir24tvIE(InfoExtractor):
    _VALID_URL = r'https?://(?:www\.)?mir24\.tv/news/(?P<id>[0-9]+)/[^/?#]+'
    _TESTS = [{
        'url': 'https://mir24.tv/news/16635210/dni-kultury-rossii-otkrylis-v-uzbekistane.-na-prazdnichnom-koncerte-vystupili-zvezdy-rossijskoj-estrada',
        'info_dict': {
            'id': '16635210',
            'title': 'Дни культуры России открылись в Узбекистане. На праздничном концерте выступили звезды российской эстрады',
            'ext': 'mp4',
            'thumbnail': 'https://images.mir24.tv/7ccONWCkXAOdwu64Wyk3JjGdrj67BTmszwf8860pWpU/q:95/w:865/h:500/c:1836:1080:nowe:84:0/rt:fill-down/czM6Ly9taXIyNC10di9tZWRpYS9BcnRpY2xlL2ltYWdlL2I0MGFhOThiLThlYjQtNDYxOC04MjA0LTE4NGI0NGNjY2NjOS9NSVIyNC0xMC4wMy4wN180N180M18wNC5TdGlsbDQ1My1jb3B5LnBuZw.jpg',
        },
    }]

    def _real_extract(self, url):
        video_id = self._match_id(url)
        webpage = self._download_webpage(url, video_id, impersonate=True)

        iframe_url = self._search_regex(
            r'<iframe\b[^>]+\bsrc=["\'](https?://mir24\.tv/players/[^"\']+)',
            webpage, 'iframe URL')

        m3u8_url = traverse_obj(iframe_url, (
            {parse_qs}, 'source', -1, {self._proto_relative_url}, {url_or_none}, {require('m3u8 URL')}))

        return {
            'id': video_id,
            'title': self._og_search_title(webpage, default=None) or self._html_extract_title(webpage),

Review comment (refactor):
```suggestion
class Mir24TvIE(InfoExtractor):
    IE_NAME = 'mir24.tv'
```

Code after:
from .common import InfoExtractor
from ..utils import parse_qs, url_or_none
from ..utils.traversal import require, traverse_obj


class Mir24TvIE(InfoExtractor):
    IE_NAME = 'mir24.tv'
    _VALID_URL = r'https?://(?:www\.)?mir24\.tv/news/(?P<id>[0-9]+)/[^/?#]+'
    _TESTS = [{
        'url': 'https://mir24.tv/news/16635210/dni-kultury-rossii-otkrylis-v-uzbekistane.-na-prazdnichnom-koncerte-vystupili-zvezdy-rossijskoj-estrada',
        'info_dict': {
            'id': '16635210',
            'title': 'Дни культуры России открылись в Узбекистане. На праздничном концерте выступили звезды российской эстрады',
            'ext': 'mp4',
            'thumbnail': r're:https://images\.mir24\.tv/.+\.jpg',
        },
    }]

    def _real_extract(self, url):
        video_id = self._match_id(url)
        webpage = self._download_webpage(url, video_id, impersonate=True)

        iframe_url = self._search_regex(
            r'<iframe\b[^>]+\bsrc=["\'](https?://mir24\.tv/players/[^"\']+)',
            webpage, 'iframe URL')

        m3u8_url = traverse_obj(iframe_url, (
            {parse_qs}, 'source', -1, {self._proto_relative_url}, {url_or_none}, {require('m3u8 URL')}))
        formats, subtitles = self._extract_m3u8_formats_and_subtitles(m3u8_url, video_id, 'mp4', m3u8_id='hls')

        return {
Repository: yt-dlp/yt-dlp
File: yt_dlp/extractor/_extractors.py (Python)

Code before:
from .medici import MediciIE
from .megaphone import MegaphoneIE
from .megatvcom import (
    MegaTVComEmbedIE,
    MegaTVComIE,
)
from .meipai import MeipaiIE
from .melonvod import MelonVODIE
from .metacritic import MetacriticIE
from .mgtv import MGTVIE
from .microsoftembed import (
    MicrosoftBuildIE,
    MicrosoftEmbedIE,
    MicrosoftLearnEpisodeIE,
    MicrosoftLearnPlaylistIE,
    MicrosoftLearnSessionIE,
    MicrosoftMediusIE,
)
from .microsoftstream import MicrosoftStreamIE
from .minds import (
    MindsChannelIE,
    MindsGroupIE,
    MindsIE,
)
from .minoto import MinotoIE
from .mir24tv import Mir24tvIE
from .mirrativ import (
    MirrativIE,
    MirrativUserIE,
)
from .mirrorcouk import MirrorCoUKIE
from .mit import (
    OCWMITIE,
    TechTVMITIE,
)
from .mitele import MiTeleIE
from .mixch import (
    MixchArchiveIE,
    MixchIE,
    MixchMovieIE,
)
from .mixcloud import (
    MixcloudIE,
    MixcloudPlaylistIE,
    MixcloudUserIE,
)
from .mlb import (
    MLBIE,
    MLBTVIE,
    MLBArticleIE,
    MLBVideoIE,

Review comment (suggestion):
```suggestion
from .mir24tv import Mir24TvIE
```

Code after:
from .medici import MediciIE
from .megaphone import MegaphoneIE
from .megatvcom import (
    MegaTVComEmbedIE,
    MegaTVComIE,
)
from .meipai import MeipaiIE
from .melonvod import MelonVODIE
from .metacritic import MetacriticIE
from .mgtv import MGTVIE
from .microsoftembed import (
    MicrosoftBuildIE,
    MicrosoftEmbedIE,
    MicrosoftLearnEpisodeIE,
    MicrosoftLearnPlaylistIE,
    MicrosoftLearnSessionIE,
    MicrosoftMediusIE,
)
from .microsoftstream import MicrosoftStreamIE
from .minds import (
    MindsChannelIE,
    MindsGroupIE,
    MindsIE,
)
from .minoto import MinotoIE
from .mir24tv import Mir24TvIE
from .mirrativ import (
    MirrativIE,
    MirrativUserIE,
)
from .mirrorcouk import MirrorCoUKIE
from .mit import (
    OCWMITIE,
    TechTVMITIE,
)
from .mitele import MiTeleIE
from .mixch import (
    MixchArchiveIE,
    MixchIE,
    MixchMovieIE,
)
from .mixcloud import (
    MixcloudIE,
    MixcloudPlaylistIE,
    MixcloudUserIE,
)
from .mlb import (
    MLBIE,
    MLBTVIE,
    MLBArticleIE,
    MLBVideoIE,
Repository: yt-dlp/yt-dlp
File: yt_dlp/extractor/parlview.py (Python)

Code before:
from yt_dlp.utils.traversal import (
    traverse_obj,
)

from .common import InfoExtractor
from ..utils import (
    ExtractorError,
    join_nonempty,
    parse_duration,
    unified_timestamp,
    url_or_none,
)


class ParlviewIE(InfoExtractor):
    _WORKING = True
    _VALID_URL = r'https?://(?:www\.)?aph\.gov\.au/(?:.*/)?video/(?P<id>\d{5,7})'
    _TESTS = [{
        'url': 'https://www.aph.gov.au/News_and_Events/Watch_Read_Listen/ParlView/video/3406614',
        'info_dict': {
            'id': '3406614',
            'ext': 'mp4',
            'title': 'Senate Chamber',
            'description': 'Official Recording of Senate Proceedings from the Australian Parliament',
            'thumbnail': 'https://aphbroadcasting-prod.z01.azurefd.net/vod-storage/vod-logos/SenateParlview06.jpg',
            'upload_date': '20250326',
            'uploader': 'Australian Parliament House',
        },
        'params': {
            'skip_download': True,
        },
    }, {
        'url': 'https://www.aph.gov.au/News_and_Events/Watch_Read_Listen/ParlView/video/3406614',
        'only_matching': True,
    }]
    _API_URL = 'https://vodapi.aph.gov.au/api/search/parlview/%s'


Review comment (suggestion):
So the import should be here

```suggestion
)
from ..utils.traversal import traverse_obj
```

Code after:
import re

from .common import InfoExtractor
from ..utils import parse_duration, parse_iso8601, url_or_none
from ..utils.traversal import traverse_obj


class ParlviewIE(InfoExtractor):
    _VALID_URL = r'https?://(?:www\.)?aph\.gov\.au/News_and_Events/Watch_Read_Listen/ParlView/video/(?P<id>[^/?#]+)'
    _TESTS = [{
        'url': 'https://www.aph.gov.au/News_and_Events/Watch_Read_Listen/ParlView/video/3406614',
        'info_dict': {
            'id': '3406614',
            'ext': 'mp4',
            'title': 'Senate Chamber',
            'description': 'Official Recording of Senate Proceedings from the Australian Parliament',
            'thumbnail': 'https://aphbroadcasting-prod.z01.azurefd.net/vod-storage/vod-logos/SenateParlview06.jpg',
            'upload_date': '20250325',
            'duration': 17999,
            'timestamp': 1742939400,
        },
        'params': {
            'skip_download': True,
        },
    }, {
        'url': 'https://www.aph.gov.au/News_and_Events/Watch_Read_Listen/ParlView/video/SV1394.dv',
        'info_dict': {
            'id': 'SV1394.dv',
            'ext': 'mp4',
            'title': 'Senate Select Committee on Uranium Mining and Milling [Part 1]',
            'description': 'Official Recording of Senate Committee Proceedings from the Australian Parliament',
            'thumbnail': 'https://aphbroadcasting-prod.z01.azurefd.net/vod-storage/vod-logos/CommitteeThumbnail06.jpg',
            'upload_date': '19960822',
            'duration': 14765,
            'timestamp': 840754200,
        },
        'params': {