We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Motherless ERROR: Unable to extract uploader_id
## Checklist

- [x] I'm reporting a broken site support
- [x] I've verified that I'm running youtube-dl version **2021.06.06**
- [x] I've checked that all provided URLs are alive and playable in a browser
- [x] I've checked that all URLs and arguments with special characters are properly quoted or escaped
- [x] I've searched the bugtracker for similar issues including closed ones


## Verbose log
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-f', 'best', '-ciw', '--verbose', 'https://motherless.com/0EBC4FA']
[debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252
[debug] youtube-dl version 2021.06.06
[debug] Python version 3.4.4 (CPython) - Windows-10-10.0.19041
[debug] exe versions: ffmpeg git-2020-05-22-38490cb, ffprobe git-2020-05-22-38490cb
[debug] Proxy map: {}
[Motherless] 0EBC4FA: Downloading webpage
ERROR: Unable to extract uploader_id; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpkqxnwl31\build\youtube_dl\YoutubeDL.py", line 815, in wrapper
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpkqxnwl31\build\youtube_dl\YoutubeDL.py", line 836, in __extract_info
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpkqxnwl31\build\youtube_dl\extractor\common.py", line 534, in extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpkqxnwl31\build\youtube_dl\extractor\motherless.py", line 131, in _real_extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpkqxnwl31\build\youtube_dl\extractor\common.py", line 1021, in _html_search_regex
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpkqxnwl31\build\youtube_dl\extractor\common.py", line 1012, in _search_regex
youtube_dl.utils.RegexNotFoundError: Unable to extract uploader_id; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

## Description

I ran the command:
youtube-dl -f best -ciw --verbose "https://motherless.com/0EBC4FA"
And got the error as written above.

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `youtube_dl/extractor/motherless.py`
Content:
```
1 from __future__ import unicode_literals
2 
3 import datetime
4 import re
5 
6 from .common import InfoExtractor
7 from ..compat import compat_urlparse
8 from ..utils import (
9     ExtractorError,
10     InAdvancePagedList,
11     orderedSet,
12     str_to_int,
13     unified_strdate,
14 )
15 
16 
17 class MotherlessIE(InfoExtractor):
18     _VALID_URL = r'https?://(?:www\.)?motherless\.com/(?:g/[a-z0-9_]+/)?(?P<id>[A-Z0-9]+)'
19     _TESTS = [{
20         'url': 'http://motherless.com/AC3FFE1',
21         'md5': '310f62e325a9fafe64f68c0bccb6e75f',
22         'info_dict': {
23             'id': 'AC3FFE1',
24             'ext': 'mp4',
25             'title': 'Fucked in the ass while playing PS3',
26             'categories': ['Gaming', 'anal', 'reluctant', 'rough', 'Wife'],
27             'upload_date': '20100913',
28             'uploader_id': 'famouslyfuckedup',
29             'thumbnail': r're:https?://.*\.jpg',
30             'age_limit': 18,
31         }
32     }, {
33         'url': 'http://motherless.com/532291B',
34         'md5': 'bc59a6b47d1f958e61fbd38a4d31b131',
35         'info_dict': {
36             'id': '532291B',
37             'ext': 'mp4',
38             'title': 'Amazing girl playing the omegle game, PERFECT!',
39             'categories': ['Amateur', 'webcam', 'omegle', 'pink', 'young', 'masturbate', 'teen',
40                            'game', 'hairy'],
41             'upload_date': '20140622',
42             'uploader_id': 'Sulivana7x',
43             'thumbnail': r're:https?://.*\.jpg',
44             'age_limit': 18,
45         },
46         'skip': '404',
47     }, {
48         'url': 'http://motherless.com/g/cosplay/633979F',
49         'md5': '0b2a43f447a49c3e649c93ad1fafa4a0',
50         'info_dict': {
51             'id': '633979F',
52             'ext': 'mp4',
53             'title': 'Turtlette',
54             'categories': ['superheroine heroine  superher'],
55             'upload_date': '20140827',
56             'uploader_id': 'shade0230',
57             'thumbnail': r're:https?://.*\.jpg',
58             'age_limit': 18,
59         }
60     }, {
61         # no keywords
62         'url': 'http://motherless.com/8B4BBC1',
63         'only_matching': True,
64     }, {
65         # see https://motherless.com/videos/recent for recent videos with
66         # uploaded date in "ago" format
67         'url': 'https://motherless.com/3C3E2CF',
68         'info_dict': {
69             'id': '3C3E2CF',
70             'ext': 'mp4',
71             'title': 'a/ Hot Teens',
72             'categories': list,
73             'upload_date': '20210104',
74             'uploader_id': 'yonbiw',
75             'thumbnail': r're:https?://.*\.jpg',
76             'age_limit': 18,
77         },
78         'params': {
79             'skip_download': True,
80         },
81     }]
82 
83     def _real_extract(self, url):
84         video_id = self._match_id(url)
85         webpage = self._download_webpage(url, video_id)
86 
87         if any(p in webpage for p in (
88                 '<title>404 - MOTHERLESS.COM<',
89                 ">The page you're looking for cannot be found.<")):
90             raise ExtractorError('Video %s does not exist' % video_id, expected=True)
91 
92         if '>The content you are trying to view is for friends only.' in webpage:
93             raise ExtractorError('Video %s is for friends only' % video_id, expected=True)
94 
95         title = self._html_search_regex(
96             (r'(?s)<div[^>]+\bclass=["\']media-meta-title[^>]+>(.+?)</div>',
97              r'id="view-upload-title">\s+([^<]+)<'), webpage, 'title')
98         video_url = (self._html_search_regex(
99             (r'setup\(\{\s*["\']file["\']\s*:\s*(["\'])(?P<url>(?:(?!\1).)+)\1',
100              r'fileurl\s*=\s*(["\'])(?P<url>(?:(?!\1).)+)\1'),
101             webpage, 'video URL', default=None, group='url')
102             or 'http://cdn4.videos.motherlessmedia.com/videos/%s.mp4?fs=opencloud' % video_id)
103         age_limit = self._rta_search(webpage)
104         view_count = str_to_int(self._html_search_regex(
105             (r'>([\d,.]+)\s+Views<', r'<strong>Views</strong>\s+([^<]+)<'),
106             webpage, 'view count', fatal=False))
107         like_count = str_to_int(self._html_search_regex(
108             (r'>([\d,.]+)\s+Favorites<',
109              r'<strong>Favorited</strong>\s+([^<]+)<'),
110             webpage, 'like count', fatal=False))
111 
112         upload_date = unified_strdate(self._search_regex(
113             r'class=["\']count[^>]+>(\d+\s+[a-zA-Z]{3}\s+\d{4})<', webpage,
114             'upload date', default=None))
115         if not upload_date:
116             uploaded_ago = self._search_regex(
117                 r'>\s*(\d+[hd])\s+[aA]go\b', webpage, 'uploaded ago',
118                 default=None)
119             if uploaded_ago:
120                 delta = int(uploaded_ago[:-1])
121                 _AGO_UNITS = {
122                     'h': 'hours',
123                     'd': 'days',
124                 }
125                 kwargs = {_AGO_UNITS.get(uploaded_ago[-1]): delta}
126                 upload_date = (datetime.datetime.utcnow() - datetime.timedelta(**kwargs)).strftime('%Y%m%d')
127 
128         comment_count = webpage.count('class="media-comment-contents"')
129         uploader_id = self._html_search_regex(
130             r'"thumb-member-username">\s+<a href="/m/([^"]+)"',
131             webpage, 'uploader_id')
132 
133         categories = self._html_search_meta('keywords', webpage, default=None)
134         if categories:
135             categories = [cat.strip() for cat in categories.split(',')]
136 
137         return {
138             'id': video_id,
139             'title': title,
140             'upload_date': upload_date,
141             'uploader_id': uploader_id,
142             'thumbnail': self._og_search_thumbnail(webpage),
143             'categories': categories,
144             'view_count': view_count,
145             'like_count': like_count,
146             'comment_count': comment_count,
147             'age_limit': age_limit,
148             'url': video_url,
149         }
150 
151 
152 class MotherlessGroupIE(InfoExtractor):
153     _VALID_URL = r'https?://(?:www\.)?motherless\.com/gv?/(?P<id>[a-z0-9_]+)'
154     _TESTS = [{
155         'url': 'http://motherless.com/g/movie_scenes',
156         'info_dict': {
157             'id': 'movie_scenes',
158             'title': 'Movie Scenes',
159             'description': 'Hot and sexy scenes from "regular" movies... '
160                            'Beautiful actresses fully nude... A looot of '
161                            'skin! :)Enjoy!',
162         },
163         'playlist_mincount': 662,
164     }, {
165         'url': 'http://motherless.com/gv/sex_must_be_funny',
166         'info_dict': {
167             'id': 'sex_must_be_funny',
168             'title': 'Sex must be funny',
169             'description': 'Sex can be funny. Wide smiles,laugh, games, fun of '
170                            'any kind!'
171         },
172         'playlist_mincount': 9,
173     }]
174 
175     @classmethod
176     def suitable(cls, url):
177         return (False if MotherlessIE.suitable(url)
178                 else super(MotherlessGroupIE, cls).suitable(url))
179 
180     def _extract_entries(self, webpage, base):
181         entries = []
182         for mobj in re.finditer(
183                 r'href="(?P<href>/[^"]+)"[^>]*>(?:\s*<img[^>]+alt="[^-]+-\s(?P<title>[^"]+)")?',
184                 webpage):
185             video_url = compat_urlparse.urljoin(base, mobj.group('href'))
186             if not MotherlessIE.suitable(video_url):
187                 continue
188             video_id = MotherlessIE._match_id(video_url)
189             title = mobj.group('title')
190             entries.append(self.url_result(
191                 video_url, ie=MotherlessIE.ie_key(), video_id=video_id,
192                 video_title=title))
193         # Alternative fallback
194         if not entries:
195             entries = [
196                 self.url_result(
197                     compat_urlparse.urljoin(base, '/' + entry_id),
198                     ie=MotherlessIE.ie_key(), video_id=entry_id)
199                 for entry_id in orderedSet(re.findall(
200                     r'data-codename=["\']([A-Z0-9]+)', webpage))]
201         return entries
202 
203     def _real_extract(self, url):
204         group_id = self._match_id(url)
205         page_url = compat_urlparse.urljoin(url, '/gv/%s' % group_id)
206         webpage = self._download_webpage(page_url, group_id)
207         title = self._search_regex(
208             r'<title>([\w\s]+\w)\s+-', webpage, 'title', fatal=False)
209         description = self._html_search_meta(
210             'description', webpage, fatal=False)
211         page_count = self._int(self._search_regex(
212             r'(\d+)</(?:a|span)><(?:a|span)[^>]+>\s*NEXT',
213             webpage, 'page_count'), 'page_count')
214         PAGE_SIZE = 80
215 
216         def _get_page(idx):
217             webpage = self._download_webpage(
218                 page_url, group_id, query={'page': idx + 1},
219                 note='Downloading page %d/%d' % (idx + 1, page_count)
220             )
221             for entry in self._extract_entries(webpage, url):
222                 yield entry
223 
224         playlist = InAdvancePagedList(_get_page, page_count, PAGE_SIZE)
225 
226         return {
227             '_type': 'playlist',
228             'id': group_id,
229             'title': title,
230             'description': description,
231             'entries': playlist
232         }
233
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/youtube_dl/extractor/motherless.py b/youtube_dl/extractor/motherless.py
--- a/youtube_dl/extractor/motherless.py
+++ b/youtube_dl/extractor/motherless.py
@@ -1,3 +1,4 @@
+# coding: utf-8
 from __future__ import unicode_literals
 
 import datetime
@@ -71,7 +72,7 @@
             'title': 'a/ Hot Teens',
             'categories': list,
             'upload_date': '20210104',
-            'uploader_id': 'yonbiw',
+            'uploader_id': 'anonymous',
             'thumbnail': r're:https?://.*\.jpg',
             'age_limit': 18,
         },
@@ -127,7 +128,7 @@
 
         comment_count = webpage.count('class="media-comment-contents"')
         uploader_id = self._html_search_regex(
-            r'"thumb-member-username">\s+<a href="/m/([^"]+)"',
+            r'''(?s)['"](?:media-meta-member|thumb-member-username)\b[^>]+>\s*<a\b[^>]+\bhref\s*=\s*['"]/m/([^"']+)''',
             webpage, 'uploader_id')
 
         categories = self._html_search_meta('keywords', webpage, default=None)
@@ -169,7 +170,7 @@
             'description': 'Sex can be funny. Wide smiles,laugh, games, fun of '
                            'any kind!'
         },
-        'playlist_mincount': 9,
+        'playlist_mincount': 0,
     }]
 
     @classmethod
@@ -208,9 +209,9 @@
             r'<title>([\w\s]+\w)\s+-', webpage, 'title', fatal=False)
         description = self._html_search_meta(
             'description', webpage, fatal=False)
-        page_count = self._int(self._search_regex(
-            r'(\d+)</(?:a|span)><(?:a|span)[^>]+>\s*NEXT',
-            webpage, 'page_count'), 'page_count')
+        page_count = str_to_int(self._search_regex(
+            r'(\d+)\s*</(?:a|span)>\s*<(?:a|span)[^>]+(?:>\s*NEXT|\brel\s*=\s*["\']?next)\b',
+            webpage, 'page_count', default='1'))
         PAGE_SIZE = 80
 
         def _get_page(idx):

{"golden_diff": "diff --git a/youtube_dl/extractor/motherless.py b/youtube_dl/extractor/motherless.py\n--- a/youtube_dl/extractor/motherless.py\n+++ b/youtube_dl/extractor/motherless.py\n@@ -1,3 +1,4 @@\n+# coding: utf-8\n from __future__ import unicode_literals\n \n import datetime\n@@ -71,7 +72,7 @@\n             'title': 'a/ Hot Teens',\n             'categories': list,\n             'upload_date': '20210104',\n-            'uploader_id': 'yonbiw',\n+            'uploader_id': 'anonymous',\n             'thumbnail': r're:https?://.*\\.jpg',\n             'age_limit': 18,\n         },\n@@ -127,7 +128,7 @@\n \n         comment_count = webpage.count('class=\"media-comment-contents\"')\n         uploader_id = self._html_search_regex(\n-            r'\"thumb-member-username\">\\s+<a href=\"/m/([^\"]+)\"',\n+            r'''(?s)['\"](?:media-meta-member|thumb-member-username)\\b[^>]+>\\s*<a\\b[^>]+\\bhref\\s*=\\s*['\"]/m/([^\"']+)''',\n             webpage, 'uploader_id')\n \n         categories = self._html_search_meta('keywords', webpage, default=None)\n@@ -169,7 +170,7 @@\n             'description': 'Sex can be funny. Wide smiles,laugh, games, fun of '\n                            'any kind!'\n         },\n-        'playlist_mincount': 9,\n+        'playlist_mincount': 0,\n     }]\n \n     @classmethod\n@@ -208,9 +209,9 @@\n             r'<title>([\\w\\s]+\\w)\\s+-', webpage, 'title', fatal=False)\n         description = self._html_search_meta(\n             'description', webpage, fatal=False)\n-        page_count = self._int(self._search_regex(\n-            r'(\\d+)</(?:a|span)><(?:a|span)[^>]+>\\s*NEXT',\n-            webpage, 'page_count'), 'page_count')\n+        page_count = str_to_int(self._search_regex(\n+            r'(\\d+)\\s*</(?:a|span)>\\s*<(?:a|span)[^>]+(?:>\\s*NEXT|\\brel\\s*=\\s*[\"\\']?next)\\b',\n+            webpage, 'page_count', default='1'))\n         PAGE_SIZE = 80\n \n         def _get_page(idx):\n", "issue": "Motherless ERROR: Unable to extract uploader_id\n## Checklist\r\n\r\n- [x] I'm reporting a broken site support\r\n- [x] I've verified that I'm running youtube-dl version **2021.06.06**\r\n- [x] I've checked that all provided URLs are alive and playable in a browser\r\n- [x] I've checked that all URLs and arguments with special characters are properly quoted or escaped\r\n- [x] I've searched the bugtracker for similar issues including closed ones\r\n\r\n\r\n## Verbose log\r\n[debug] System config: []\r\n[debug] User config: []\r\n[debug] Custom config: []\r\n[debug] Command-line args: ['-f', 'best', '-ciw', '--verbose', 'https://motherless.com/0EBC4FA']\r\n[debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252\r\n[debug] youtube-dl version 2021.06.06\r\n[debug] Python version 3.4.4 (CPython) - Windows-10-10.0.19041\r\n[debug] exe versions: ffmpeg git-2020-05-22-38490cb, ffprobe git-2020-05-22-38490cb\r\n[debug] Proxy map: {}\r\n[Motherless] 0EBC4FA: Downloading webpage\r\nERROR: Unable to extract uploader_id; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.\r\nTraceback (most recent call last):\r\n  File \"C:\\Users\\dst\\AppData\\Roaming\\Build archive\\youtube-dl\\ytdl-org\\tmpkqxnwl31\\build\\youtube_dl\\YoutubeDL.py\", line 815, in wrapper\r\n  File \"C:\\Users\\dst\\AppData\\Roaming\\Build archive\\youtube-dl\\ytdl-org\\tmpkqxnwl31\\build\\youtube_dl\\YoutubeDL.py\", line 836, in __extract_info\r\n  File \"C:\\Users\\dst\\AppData\\Roaming\\Build archive\\youtube-dl\\ytdl-org\\tmpkqxnwl31\\build\\youtube_dl\\extractor\\common.py\", line 534, in extract\r\n  File \"C:\\Users\\dst\\AppData\\Roaming\\Build archive\\youtube-dl\\ytdl-org\\tmpkqxnwl31\\build\\youtube_dl\\extractor\\motherless.py\", line 131, in _real_extract\r\n  File \"C:\\Users\\dst\\AppData\\Roaming\\Build archive\\youtube-dl\\ytdl-org\\tmpkqxnwl31\\build\\youtube_dl\\extractor\\common.py\", line 1021, in _html_search_regex\r\n  File \"C:\\Users\\dst\\AppData\\Roaming\\Build archive\\youtube-dl\\ytdl-org\\tmpkqxnwl31\\build\\youtube_dl\\extractor\\common.py\", line 1012, in _search_regex\r\nyoutube_dl.utils.RegexNotFoundError: Unable to extract uploader_id; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.\r\n\r\n## Description\r\n\r\nI ran the command:\r\nyoutube-dl -f best -ciw --verbose \"https://motherless.com/0EBC4FA\"\r\nAnd got the error as written above.\n", "before_files": [{"content": "from __future__ import unicode_literals\n\nimport datetime\nimport re\n\nfrom .common import InfoExtractor\nfrom ..compat import compat_urlparse\nfrom ..utils import (\n    ExtractorError,\n    InAdvancePagedList,\n    orderedSet,\n    str_to_int,\n    unified_strdate,\n)\n\n\nclass MotherlessIE(InfoExtractor):\n    _VALID_URL = r'https?://(?:www\\.)?motherless\\.com/(?:g/[a-z0-9_]+/)?(?P<id>[A-Z0-9]+)'\n    _TESTS = [{\n        'url': 'http://motherless.com/AC3FFE1',\n        'md5': '310f62e325a9fafe64f68c0bccb6e75f',\n        'info_dict': {\n            'id': 'AC3FFE1',\n            'ext': 'mp4',\n            'title': 'Fucked in the ass while playing PS3',\n            'categories': ['Gaming', 'anal', 'reluctant', 'rough', 'Wife'],\n            'upload_date': '20100913',\n            'uploader_id': 'famouslyfuckedup',\n            'thumbnail': r're:https?://.*\\.jpg',\n            'age_limit': 18,\n        }\n    }, {\n        'url': 'http://motherless.com/532291B',\n        'md5': 'bc59a6b47d1f958e61fbd38a4d31b131',\n        'info_dict': {\n            'id': '532291B',\n            'ext': 'mp4',\n            'title': 'Amazing girl playing the omegle game, PERFECT!',\n            'categories': ['Amateur', 'webcam', 'omegle', 'pink', 'young', 'masturbate', 'teen',\n                           'game', 'hairy'],\n            'upload_date': '20140622',\n            'uploader_id': 'Sulivana7x',\n            'thumbnail': r're:https?://.*\\.jpg',\n            'age_limit': 18,\n        },\n        'skip': '404',\n    }, {\n        'url': 'http://motherless.com/g/cosplay/633979F',\n        'md5': '0b2a43f447a49c3e649c93ad1fafa4a0',\n        'info_dict': {\n            'id': '633979F',\n            'ext': 'mp4',\n            'title': 'Turtlette',\n            'categories': ['superheroine heroine  superher'],\n            'upload_date': '20140827',\n            'uploader_id': 'shade0230',\n            'thumbnail': r're:https?://.*\\.jpg',\n            'age_limit': 18,\n        }\n    }, {\n        # no keywords\n        'url': 'http://motherless.com/8B4BBC1',\n        'only_matching': True,\n    }, {\n        # see https://motherless.com/videos/recent for recent videos with\n        # uploaded date in \"ago\" format\n        'url': 'https://motherless.com/3C3E2CF',\n        'info_dict': {\n            'id': '3C3E2CF',\n            'ext': 'mp4',\n            'title': 'a/ Hot Teens',\n            'categories': list,\n            'upload_date': '20210104',\n            'uploader_id': 'yonbiw',\n            'thumbnail': r're:https?://.*\\.jpg',\n            'age_limit': 18,\n        },\n        'params': {\n            'skip_download': True,\n        },\n    }]\n\n    def _real_extract(self, url):\n        video_id = self._match_id(url)\n        webpage = self._download_webpage(url, video_id)\n\n        if any(p in webpage for p in (\n                '<title>404 - MOTHERLESS.COM<',\n                \">The page you're looking for cannot be found.<\")):\n            raise ExtractorError('Video %s does not exist' % video_id, expected=True)\n\n        if '>The content you are trying to view is for friends only.' in webpage:\n            raise ExtractorError('Video %s is for friends only' % video_id, expected=True)\n\n        title = self._html_search_regex(\n            (r'(?s)<div[^>]+\\bclass=[\"\\']media-meta-title[^>]+>(.+?)</div>',\n             r'id=\"view-upload-title\">\\s+([^<]+)<'), webpage, 'title')\n        video_url = (self._html_search_regex(\n            (r'setup\\(\\{\\s*[\"\\']file[\"\\']\\s*:\\s*([\"\\'])(?P<url>(?:(?!\\1).)+)\\1',\n             r'fileurl\\s*=\\s*([\"\\'])(?P<url>(?:(?!\\1).)+)\\1'),\n            webpage, 'video URL', default=None, group='url')\n            or 'http://cdn4.videos.motherlessmedia.com/videos/%s.mp4?fs=opencloud' % video_id)\n        age_limit = self._rta_search(webpage)\n        view_count = str_to_int(self._html_search_regex(\n            (r'>([\\d,.]+)\\s+Views<', r'<strong>Views</strong>\\s+([^<]+)<'),\n            webpage, 'view count', fatal=False))\n        like_count = str_to_int(self._html_search_regex(\n            (r'>([\\d,.]+)\\s+Favorites<',\n             r'<strong>Favorited</strong>\\s+([^<]+)<'),\n            webpage, 'like count', fatal=False))\n\n        upload_date = unified_strdate(self._search_regex(\n            r'class=[\"\\']count[^>]+>(\\d+\\s+[a-zA-Z]{3}\\s+\\d{4})<', webpage,\n            'upload date', default=None))\n        if not upload_date:\n            uploaded_ago = self._search_regex(\n                r'>\\s*(\\d+[hd])\\s+[aA]go\\b', webpage, 'uploaded ago',\n                default=None)\n            if uploaded_ago:\n                delta = int(uploaded_ago[:-1])\n                _AGO_UNITS = {\n                    'h': 'hours',\n                    'd': 'days',\n                }\n                kwargs = {_AGO_UNITS.get(uploaded_ago[-1]): delta}\n                upload_date = (datetime.datetime.utcnow() - datetime.timedelta(**kwargs)).strftime('%Y%m%d')\n\n        comment_count = webpage.count('class=\"media-comment-contents\"')\n        uploader_id = self._html_search_regex(\n            r'\"thumb-member-username\">\\s+<a href=\"/m/([^\"]+)\"',\n            webpage, 'uploader_id')\n\n        categories = self._html_search_meta('keywords', webpage, default=None)\n        if categories:\n            categories = [cat.strip() for cat in categories.split(',')]\n\n        return {\n            'id': video_id,\n            'title': title,\n            'upload_date': upload_date,\n            'uploader_id': uploader_id,\n            'thumbnail': self._og_search_thumbnail(webpage),\n            'categories': categories,\n            'view_count': view_count,\n            'like_count': like_count,\n            'comment_count': comment_count,\n            'age_limit': age_limit,\n            'url': video_url,\n        }\n\n\nclass MotherlessGroupIE(InfoExtractor):\n    _VALID_URL = r'https?://(?:www\\.)?motherless\\.com/gv?/(?P<id>[a-z0-9_]+)'\n    _TESTS = [{\n        'url': 'http://motherless.com/g/movie_scenes',\n        'info_dict': {\n            'id': 'movie_scenes',\n            'title': 'Movie Scenes',\n            'description': 'Hot and sexy scenes from \"regular\" movies... '\n                           'Beautiful actresses fully nude... A looot of '\n                           'skin! :)Enjoy!',\n        },\n        'playlist_mincount': 662,\n    }, {\n        'url': 'http://motherless.com/gv/sex_must_be_funny',\n        'info_dict': {\n            'id': 'sex_must_be_funny',\n            'title': 'Sex must be funny',\n            'description': 'Sex can be funny. Wide smiles,laugh, games, fun of '\n                           'any kind!'\n        },\n        'playlist_mincount': 9,\n    }]\n\n    @classmethod\n    def suitable(cls, url):\n        return (False if MotherlessIE.suitable(url)\n                else super(MotherlessGroupIE, cls).suitable(url))\n\n    def _extract_entries(self, webpage, base):\n        entries = []\n        for mobj in re.finditer(\n                r'href=\"(?P<href>/[^\"]+)\"[^>]*>(?:\\s*<img[^>]+alt=\"[^-]+-\\s(?P<title>[^\"]+)\")?',\n                webpage):\n            video_url = compat_urlparse.urljoin(base, mobj.group('href'))\n            if not MotherlessIE.suitable(video_url):\n                continue\n            video_id = MotherlessIE._match_id(video_url)\n            title = mobj.group('title')\n            entries.append(self.url_result(\n                video_url, ie=MotherlessIE.ie_key(), video_id=video_id,\n                video_title=title))\n        # Alternative fallback\n        if not entries:\n            entries = [\n                self.url_result(\n                    compat_urlparse.urljoin(base, '/' + entry_id),\n                    ie=MotherlessIE.ie_key(), video_id=entry_id)\n                for entry_id in orderedSet(re.findall(\n                    r'data-codename=[\"\\']([A-Z0-9]+)', webpage))]\n        return entries\n\n    def _real_extract(self, url):\n        group_id = self._match_id(url)\n        page_url = compat_urlparse.urljoin(url, '/gv/%s' % group_id)\n        webpage = self._download_webpage(page_url, group_id)\n        title = self._search_regex(\n            r'<title>([\\w\\s]+\\w)\\s+-', webpage, 'title', fatal=False)\n        description = self._html_search_meta(\n            'description', webpage, fatal=False)\n        page_count = self._int(self._search_regex(\n            r'(\\d+)</(?:a|span)><(?:a|span)[^>]+>\\s*NEXT',\n            webpage, 'page_count'), 'page_count')\n        PAGE_SIZE = 80\n\n        def _get_page(idx):\n            webpage = self._download_webpage(\n                page_url, group_id, query={'page': idx + 1},\n                note='Downloading page %d/%d' % (idx + 1, page_count)\n            )\n            for entry in self._extract_entries(webpage, url):\n                yield entry\n\n        playlist = InAdvancePagedList(_get_page, page_count, PAGE_SIZE)\n\n        return {\n            '_type': 'playlist',\n            'id': group_id,\n            'title': title,\n            'description': description,\n            'entries': playlist\n        }\n", "path": "youtube_dl/extractor/motherless.py"}], "after_files": [{"content": "# coding: utf-8\nfrom __future__ import unicode_literals\n\nimport datetime\nimport re\n\nfrom .common import InfoExtractor\nfrom ..compat import compat_urlparse\nfrom ..utils import (\n    ExtractorError,\n    InAdvancePagedList,\n    orderedSet,\n    str_to_int,\n    unified_strdate,\n)\n\n\nclass MotherlessIE(InfoExtractor):\n    _VALID_URL = r'https?://(?:www\\.)?motherless\\.com/(?:g/[a-z0-9_]+/)?(?P<id>[A-Z0-9]+)'\n    _TESTS = [{\n        'url': 'http://motherless.com/AC3FFE1',\n        'md5': '310f62e325a9fafe64f68c0bccb6e75f',\n        'info_dict': {\n            'id': 'AC3FFE1',\n            'ext': 'mp4',\n            'title': 'Fucked in the ass while playing PS3',\n            'categories': ['Gaming', 'anal', 'reluctant', 'rough', 'Wife'],\n            'upload_date': '20100913',\n            'uploader_id': 'famouslyfuckedup',\n            'thumbnail': r're:https?://.*\\.jpg',\n            'age_limit': 18,\n        }\n    }, {\n        'url': 'http://motherless.com/532291B',\n        'md5': 'bc59a6b47d1f958e61fbd38a4d31b131',\n        'info_dict': {\n            'id': '532291B',\n            'ext': 'mp4',\n            'title': 'Amazing girl playing the omegle game, PERFECT!',\n            'categories': ['Amateur', 'webcam', 'omegle', 'pink', 'young', 'masturbate', 'teen',\n                           'game', 'hairy'],\n            'upload_date': '20140622',\n            'uploader_id': 'Sulivana7x',\n            'thumbnail': r're:https?://.*\\.jpg',\n            'age_limit': 18,\n        },\n        'skip': '404',\n    }, {\n        'url': 'http://motherless.com/g/cosplay/633979F',\n        'md5': '0b2a43f447a49c3e649c93ad1fafa4a0',\n        'info_dict': {\n            'id': '633979F',\n            'ext': 'mp4',\n            'title': 'Turtlette',\n            'categories': ['superheroine heroine  superher'],\n            'upload_date': '20140827',\n            'uploader_id': 'shade0230',\n            'thumbnail': r're:https?://.*\\.jpg',\n            'age_limit': 18,\n        }\n    }, {\n        # no keywords\n        'url': 'http://motherless.com/8B4BBC1',\n        'only_matching': True,\n    }, {\n        # see https://motherless.com/videos/recent for recent videos with\n        # uploaded date in \"ago\" format\n        'url': 'https://motherless.com/3C3E2CF',\n        'info_dict': {\n            'id': '3C3E2CF',\n            'ext': 'mp4',\n            'title': 'a/ Hot Teens',\n            'categories': list,\n            'upload_date': '20210104',\n            'uploader_id': 'anonymous',\n            'thumbnail': r're:https?://.*\\.jpg',\n            'age_limit': 18,\n        },\n        'params': {\n            'skip_download': True,\n        },\n    }]\n\n    def _real_extract(self, url):\n        video_id = self._match_id(url)\n        webpage = self._download_webpage(url, video_id)\n\n        if any(p in webpage for p in (\n                '<title>404 - MOTHERLESS.COM<',\n                \">The page you're looking for cannot be found.<\")):\n            raise ExtractorError('Video %s does not exist' % video_id, expected=True)\n\n        if '>The content you are trying to view is for friends only.' in webpage:\n            raise ExtractorError('Video %s is for friends only' % video_id, expected=True)\n\n        title = self._html_search_regex(\n            (r'(?s)<div[^>]+\\bclass=[\"\\']media-meta-title[^>]+>(.+?)</div>',\n             r'id=\"view-upload-title\">\\s+([^<]+)<'), webpage, 'title')\n        video_url = (self._html_search_regex(\n            (r'setup\\(\\{\\s*[\"\\']file[\"\\']\\s*:\\s*([\"\\'])(?P<url>(?:(?!\\1).)+)\\1',\n             r'fileurl\\s*=\\s*([\"\\'])(?P<url>(?:(?!\\1).)+)\\1'),\n            webpage, 'video URL', default=None, group='url')\n            or 'http://cdn4.videos.motherlessmedia.com/videos/%s.mp4?fs=opencloud' % video_id)\n        age_limit = self._rta_search(webpage)\n        view_count = str_to_int(self._html_search_regex(\n            (r'>([\\d,.]+)\\s+Views<', r'<strong>Views</strong>\\s+([^<]+)<'),\n            webpage, 'view count', fatal=False))\n        like_count = str_to_int(self._html_search_regex(\n            (r'>([\\d,.]+)\\s+Favorites<',\n             r'<strong>Favorited</strong>\\s+([^<]+)<'),\n            webpage, 'like count', fatal=False))\n\n        upload_date = unified_strdate(self._search_regex(\n            r'class=[\"\\']count[^>]+>(\\d+\\s+[a-zA-Z]{3}\\s+\\d{4})<', webpage,\n            'upload date', default=None))\n        if not upload_date:\n            uploaded_ago = self._search_regex(\n                r'>\\s*(\\d+[hd])\\s+[aA]go\\b', webpage, 'uploaded ago',\n                default=None)\n            if uploaded_ago:\n                delta = int(uploaded_ago[:-1])\n                _AGO_UNITS = {\n                    'h': 'hours',\n                    'd': 'days',\n                }\n                kwargs = {_AGO_UNITS.get(uploaded_ago[-1]): delta}\n                upload_date = (datetime.datetime.utcnow() - datetime.timedelta(**kwargs)).strftime('%Y%m%d')\n\n        comment_count = webpage.count('class=\"media-comment-contents\"')\n        uploader_id = self._html_search_regex(\n            r'''(?s)['\"](?:media-meta-member|thumb-member-username)\\b[^>]+>\\s*<a\\b[^>]+\\bhref\\s*=\\s*['\"]/m/([^\"']+)''',\n            webpage, 'uploader_id')\n\n        categories = self._html_search_meta('keywords', webpage, default=None)\n        if categories:\n            categories = [cat.strip() for cat in categories.split(',')]\n\n        return {\n            'id': video_id,\n            'title': title,\n            'upload_date': upload_date,\n            'uploader_id': uploader_id,\n            'thumbnail': self._og_search_thumbnail(webpage),\n            'categories': categories,\n            'view_count': view_count,\n            'like_count': like_count,\n            'comment_count': comment_count,\n            'age_limit': age_limit,\n            'url': video_url,\n        }\n\n\nclass MotherlessGroupIE(InfoExtractor):\n    _VALID_URL = r'https?://(?:www\\.)?motherless\\.com/gv?/(?P<id>[a-z0-9_]+)'\n    _TESTS = [{\n        'url': 'http://motherless.com/g/movie_scenes',\n        'info_dict': {\n            'id': 'movie_scenes',\n            'title': 'Movie Scenes',\n            'description': 'Hot and sexy scenes from \"regular\" movies... '\n                           'Beautiful actresses fully nude... A looot of '\n                           'skin! :)Enjoy!',\n        },\n        'playlist_mincount': 662,\n    }, {\n        'url': 'http://motherless.com/gv/sex_must_be_funny',\n        'info_dict': {\n            'id': 'sex_must_be_funny',\n            'title': 'Sex must be funny',\n            'description': 'Sex can be funny. Wide smiles,laugh, games, fun of '\n                           'any kind!'\n        },\n        'playlist_mincount': 0,\n    }]\n\n    @classmethod\n    def suitable(cls, url):\n        return (False if MotherlessIE.suitable(url)\n                else super(MotherlessGroupIE, cls).suitable(url))\n\n    def _extract_entries(self, webpage, base):\n        entries = []\n        for mobj in re.finditer(\n                r'href=\"(?P<href>/[^\"]+)\"[^>]*>(?:\\s*<img[^>]+alt=\"[^-]+-\\s(?P<title>[^\"]+)\")?',\n                webpage):\n            video_url = compat_urlparse.urljoin(base, mobj.group('href'))\n            if not MotherlessIE.suitable(video_url):\n                continue\n            video_id = MotherlessIE._match_id(video_url)\n            title = mobj.group('title')\n            entries.append(self.url_result(\n                video_url, ie=MotherlessIE.ie_key(), video_id=video_id,\n                video_title=title))\n        # Alternative fallback\n        if not entries:\n            entries = [\n                self.url_result(\n                    compat_urlparse.urljoin(base, '/' + entry_id),\n                    ie=MotherlessIE.ie_key(), video_id=entry_id)\n                for entry_id in orderedSet(re.findall(\n                    r'data-codename=[\"\\']([A-Z0-9]+)', webpage))]\n        return entries\n\n    def _real_extract(self, url):\n        group_id = self._match_id(url)\n        page_url = compat_urlparse.urljoin(url, '/gv/%s' % group_id)\n        webpage = self._download_webpage(page_url, group_id)\n        title = self._search_regex(\n            r'<title>([\\w\\s]+\\w)\\s+-', webpage, 'title', fatal=False)\n        description = self._html_search_meta(\n            'description', webpage, fatal=False)\n        page_count = str_to_int(self._search_regex(\n            r'(\\d+)\\s*</(?:a|span)>\\s*<(?:a|span)[^>]+(?:>\\s*NEXT|\\brel\\s*=\\s*[\"\\']?next)\\b',\n            webpage, 'page_count', default='1'))\n        PAGE_SIZE = 80\n\n        def _get_page(idx):\n            webpage = self._download_webpage(\n                page_url, group_id, query={'page': idx + 1},\n                note='Downloading page %d/%d' % (idx + 1, page_count)\n            )\n            for entry in self._extract_entries(webpage, url):\n                yield entry\n\n        playlist = InAdvancePagedList(_get_page, page_count, PAGE_SIZE)\n\n        return {\n            '_type': 'playlist',\n            'id': group_id,\n            'title': title,\n            'description': description,\n            'entries': playlist\n        }\n", "path": "youtube_dl/extractor/motherless.py"}]}