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

Code before:
import functools

from .common import InfoExtractor
from ..utils import (
    ExtractorError,
    OnDemandPagedList,
    urlencode_postdata,
    extract_attributes
)


class MurrtubeIE(InfoExtractor):
    _VALID_URL = r'''(?x)
                        (?:
                            murrtube:|
                            https?://murrtube\.net/v/|
                            https?://murrtube\.net/videos/(?P<slug>[a-z0-9\-]+?)\-
                        )
                        (?P<id>[A-Z0-9]{4}|[a-f0-9]{8}\-[a-f0-9]{4}\-[a-f0-9]{4}\-[a-f0-9]{4}\-[a-f0-9]{12})
                    '''

    _TESTS = [
        {
            'url': 'https://murrtube.net/videos/inferno-x-skyler-148b6f2a-fdcc-4902-affe-9c0f41aaaca0',
            'md5': '70380878a77e8565d4aea7f68b8bbb35',
            'info_dict': {
                'id': 'ca885d8456b95de529b6723b158032e11115d',
                'ext': 'mp4',
                'title': 'Inferno X Skyler',
                'description': 'Humping a very good slutty sheppy (roomate)',
                'uploader': 'Inferno Wolf',
                'age_limit': 18,
                'thumbnail': 'https://storage.murrtube.net/murrtube-production/ekbs3zcfvuynnqfx72nn2tkokvsd',
                'comment_count': int,
                'view_count': int,
                'like_count': int,
            },
        },
        {
            'url': 'https://murrtube.net/v/0J2Q',
            'md5': '31262f6ac56f0ca75e5a54a0f3fefcb6',
            'info_dict': {
                'id': '8442998c52134968d9caa36e473e1a6bac6ca',
                'ext': 'mp4',

Review comment (suggestion):
```suggestion
                        (?P<id>[A-Z0-9]{4}|[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12})
```

Code after:
import functools
import json

from .common import InfoExtractor
from ..utils import (
    ExtractorError,
    OnDemandPagedList,
    clean_html,
    extract_attributes,
    get_element_by_class,
    get_element_html_by_id,
    parse_count,
    remove_end,
    update_url,
    urlencode_postdata,
)


class MurrtubeIE(InfoExtractor):
    _VALID_URL = r'''(?x)
                        (?:
                            murrtube:|
                            https?://murrtube\.net/(?:v/|videos/(?P<slug>[a-z0-9-]+?)-)
                        )
                        (?P<id>[A-Z0-9]{4}|[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12})
                    '''
    _TESTS = [{
        'url': 'https://murrtube.net/videos/inferno-x-skyler-148b6f2a-fdcc-4902-affe-9c0f41aaaca0',
        'md5': '70380878a77e8565d4aea7f68b8bbb35',
        'info_dict': {
            'id': 'ca885d8456b95de529b6723b158032e11115d',
            'ext': 'mp4',
            'title': 'Inferno X Skyler',
            'description': 'Humping a very good slutty sheppy (roomate)',
            'uploader': 'Inferno Wolf',
            'age_limit': 18,
            'thumbnail': 'https://storage.murrtube.net/murrtube-production/ekbs3zcfvuynnqfx72nn2tkokvsd',
            'comment_count': int,
            'view_count': int,
            'like_count': int,
        },
    }, {
        'url': 'https://murrtube.net/v/0J2Q',
        'md5': '31262f6ac56f0ca75e5a54a0f3fefcb6',