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

Code before:
import re

from .common import InfoExtractor
from ..utils import (
    clean_html,
    float_or_none,
    get_element_by_class,
    get_element_by_id,
    get_element_html_by_class,
    get_elements_by_class,
    int_or_none,
    unified_timestamp,
    urlencode_postdata,
)


class NubilesPornIE(InfoExtractor):
    _NETRC_MACHINE = 'nubiles-porn'
    _VALID_URL = r'https://members.nubiles-porn.com/video/watch/(?P<id>\d+)/(?P<display_id>[a-z\d\-]+-(s(?P<season>\d+)e(?P<episode>\d+))$)'

    _TESTS = [{
        'url': 'https://members.nubiles-porn.com/video/watch/165320/trying-to-focus-my-one-track-mind-s3e1',
        'md5': 'fa7f09da8027c35e4bdf0f94f55eac82',
        'info_dict': {
            'id': '165320',
            'title': 'Trying To Focus My One Track Mind - S3:E1',
            'ext': 'mp4',
            'display_id': 'trying-to-focus-my-one-track-mind-s3e1',
            'thumbnail': 'https://images.nubiles-porn.com/videos/trying_to_focus_my_one_track_mind/samples/cover1280.jpg',
            'description': 'md5:81f3d4372e0e39bff5c801da277a5141',
            'timestamp': 1676160000,
            'upload_date': '20230212',
            'channel': 'Younger Mommy',
            'channel_id': 64,
            'channel_url': 'https://members.nubiles-porn.com/video/website/64',
            'like_count': int,
            'average_rating': float,
            'age_limit': 18,
            'categories': ['Big Boobs', 'Big Naturals', 'Blowjob', 'Brunette', 'Cowgirl', 'Girl Orgasm', 'Girl-Boy',
                           'Glasses', 'Hardcore', 'Milf', 'Shaved Pussy', 'Tattoos', 'YoungerMommy.com'],
            'tags': list,
            'cast': ['Kenzie Love'],
            'availability': 'needs_auth',
            'series': 'Younger Mommy',

Review comment (suggestion):
```suggestion
    _VALID_URL = r'''(?x)
        https://members.nubiles-porn.com/video/watch/(?P<id>\d+)
        (?:/(?P<display_id>[\w\-]+-s(?P<season>\d+)e(?P<episode>\d+)))?
    '''
```
URL need not have display_id

Code after:
import re

from .common import InfoExtractor
from ..utils import (
    clean_html,
    float_or_none,
    format_field,
    get_element_by_class,
    get_element_by_id,
    get_element_html_by_class,
    get_elements_by_class,
    int_or_none,
    try_call,
    unified_timestamp,
    urlencode_postdata,
)


class NubilesPornIE(InfoExtractor):
    _NETRC_MACHINE = 'nubiles-porn'
    _VALID_URL = r'''(?x)
        https://members.nubiles-porn.com/video/watch/(?P<id>\d+)
        (?:/(?P<display_id>[\w\-]+-s(?P<season>\d+)e(?P<episode>\d+)))?
    '''

    _TESTS = [{
        'url': 'https://members.nubiles-porn.com/video/watch/165320/trying-to-focus-my-one-track-mind-s3e1',
        'md5': 'fa7f09da8027c35e4bdf0f94f55eac82',
        'info_dict': {
            'id': '165320',
            'title': 'Trying To Focus My One Track Mind - S3:E1',
            'ext': 'mp4',
            'display_id': 'trying-to-focus-my-one-track-mind-s3e1',
            'thumbnail': 'https://images.nubiles-porn.com/videos/trying_to_focus_my_one_track_mind/samples/cover1280.jpg',
            'description': 'md5:81f3d4372e0e39bff5c801da277a5141',
            'timestamp': 1676160000,
            'upload_date': '20230212',
            'channel': 'Younger Mommy',
            'channel_id': '64',
            'channel_url': 'https://members.nubiles-porn.com/video/website/64',
            'like_count': int,
            'average_rating': float,
            'age_limit': 18,
            'categories': ['Big Boobs', 'Big Naturals', 'Blowjob', 'Brunette', 'Cowgirl', 'Girl Orgasm', 'Girl-Boy',