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

Code before:
from .common import InfoExtractor
from .brightcove import BrightcoveNewIE

from ..utils import ExtractorError, traverse_obj


class NineNewsIE(InfoExtractor):
    IE_NAME = '9News'
    _VALID_URL = r'https?://(?:www\.)?9news\.com\.au/\w+/(?:\w+/)?[^/]+/(?P<id>[^/]+)(?:$|[?#])'
    _TESTS = [{
        'url': 'https://www.9news.com.au/videos/national/fair-trading-pulls-dozens-of-toys-from-shelves/clqgc7dvj000y0jnvfism0w5m',
        'md5': 'd1a65b2e9d126e5feb9bc5cb96e62c80',
        'info_dict': {
            'id': '6343717246112',
            'ext': 'mp4',
            'title': 'Fair Trading pulls dozens of toys from shelves',
            'description': 'Fair Trading Australia have been forced to pull dozens of toys from shelves over hazard fears.',
            'thumbnail': 'md5:bdbe44294e2323b762d97acf8843f66c',
            'duration': 93.44,
            'timestamp': 1703231748,
            'upload_date': '20231222',
            'uploader_id': '664969388001',
            'tags': ['networkclip', 'aunews_aunationalninenews', 'christmas presents', 'toys', 'fair trading', 'au_news'],
        }
    }, {
        'url': 'https://www.9news.com.au/world/tape-reveals-donald-trump-pressured-michigan-officials-not-to-certify-2020-vote-a-new-report-says/0b8b880e-7d3c-41b9-b2bd-55bc7e492259',
        'md5': 'a885c44d20898c3e70e9a53e8188cea1',
        'info_dict': {
            'id': '6343587450112',
            'ext': 'mp4',
            'title': 'Trump found ineligible to run for president by state court',
            'description': 'md5:40e6e7db7a4ac6be0e960569a5af6066',
            'thumbnail': 'md5:3e132c48c186039fd06c10787de9bff2',
            'duration': 104.64,

Review comment (suggestion):
```suggestion
    _VALID_URL = r'https?://(?:www\.)?9news\.com\.au/(?:[\w-]+/){2,3}(?P<id>[\w-]+)/?(?:$|[?#])'
```

Code after:
from .common import InfoExtractor
from .brightcove import BrightcoveNewIE
from ..utils import ExtractorError
from ..utils.traversal import traverse_obj


class NineNewsIE(InfoExtractor):
    IE_NAME = '9News'
    _VALID_URL = r'https?://(?:www\.)?9news\.com\.au/(?:[\w-]+/){2,3}(?P<id>[\w-]+)/?(?:$|[?#])'
    _TESTS = [{
        'url': 'https://www.9news.com.au/videos/national/fair-trading-pulls-dozens-of-toys-from-shelves/clqgc7dvj000y0jnvfism0w5m',
        'md5': 'd1a65b2e9d126e5feb9bc5cb96e62c80',
        'info_dict': {
            'id': '6343717246112',
            'ext': 'mp4',
            'title': 'Fair Trading pulls dozens of toys from shelves',
            'description': 'Fair Trading Australia have been forced to pull dozens of toys from shelves over hazard fears.',
            'thumbnail': 'md5:bdbe44294e2323b762d97acf8843f66c',
            'duration': 93.44,
            'timestamp': 1703231748,
            'upload_date': '20231222',
            'uploader_id': '664969388001',
            'tags': ['networkclip', 'aunews_aunationalninenews', 'christmas presents', 'toys', 'fair trading', 'au_news'],
        }
    }, {
        'url': 'https://www.9news.com.au/world/tape-reveals-donald-trump-pressured-michigan-officials-not-to-certify-2020-vote-a-new-report-says/0b8b880e-7d3c-41b9-b2bd-55bc7e492259',
        'md5': 'a885c44d20898c3e70e9a53e8188cea1',
        'info_dict': {
            'id': '6343587450112',
            'ext': 'mp4',
            'title': 'Trump found ineligible to run for president by state court',
            'description': 'md5:40e6e7db7a4ac6be0e960569a5af6066',
            'thumbnail': 'md5:3e132c48c186039fd06c10787de9bff2',
            'duration': 104.64,