We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Ignore subdomains on reddit URLs
### Make sure you are using the *latest* version: run `youtube-dl --version` and ensure your version is *2018.05.09*. If it's not, read [this FAQ entry](https://github.com/rg3/youtube-dl/blob/master/README.md#how-do-i-update-youtube-dl) and update. Issues with outdated version will be rejected.
- [x] I've **verified** and **I assure** that I'm running youtube-dl **2018.05.09**

### Before submitting an *issue* make sure you have:
- [x] At least skimmed through the [README](https://github.com/rg3/youtube-dl/blob/master/README.md), **most notably** the [FAQ](https://github.com/rg3/youtube-dl#faq) and [BUGS](https://github.com/rg3/youtube-dl#bugs) sections
- [x] [Searched](https://github.com/rg3/youtube-dl/search?type=Issues) the bugtracker for similar issues including closed ones
- [x] Checked that provided video/audio/playlist URLs (if any) are alive and playable in a browser

### What is the purpose of your *issue*?
- [ ] Bug report (encountered problems with youtube-dl)
- [x] Site support request (request for adding support for a new site)
- [ ] Feature request (request for a new functionality)
- [ ] Question
- [ ] Other

---

### If the purpose of this *issue* is a *site support request* please provide all kinds of example URLs support for which should be included (replace following example URLs by **yours**):
- Single video: https://nm.reddit.com/r/Cricket/comments/8idvby/lousy_cameraman_finds_himself_in_cairns_line_of/


Note that **youtube-dl does not support sites dedicated to [copyright infringement](https://github.com/rg3/youtube-dl#can-you-add-support-for-this-anime-video-site-or-site-which-shows-current-movies-for-free)**. In order for site support request to be accepted all provided example URLs should not violate any copyrights.

---

### Description of your *issue*, suggested solution and other information

Various subs use dm or nm subdomain which apply different css, there's also np subdomain which does the same. reddit also has a massive number of [2 alphabet subdomains to serve the site in different languages](https://np.reddit.com/r/redditdev/comments/2dh18g/is_there_a_list_of_redditcom_subdomains_not/).

youtube-dl already supports www and old, but it's not possible to add support for each and every one of them so it'd be better to ignore it altogether since it doesn't affect reddit detection or .json API availability.

I'll submit a PR if this solution is acceptable.
Ignore subdomains on reddit URLs
### Make sure you are using the *latest* version: run `youtube-dl --version` and ensure your version is *2018.05.09*. If it's not, read [this FAQ entry](https://github.com/rg3/youtube-dl/blob/master/README.md#how-do-i-update-youtube-dl) and update. Issues with outdated version will be rejected.
- [x] I've **verified** and **I assure** that I'm running youtube-dl **2018.05.09**

### Before submitting an *issue* make sure you have:
- [x] At least skimmed through the [README](https://github.com/rg3/youtube-dl/blob/master/README.md), **most notably** the [FAQ](https://github.com/rg3/youtube-dl#faq) and [BUGS](https://github.com/rg3/youtube-dl#bugs) sections
- [x] [Searched](https://github.com/rg3/youtube-dl/search?type=Issues) the bugtracker for similar issues including closed ones
- [x] Checked that provided video/audio/playlist URLs (if any) are alive and playable in a browser

### What is the purpose of your *issue*?
- [ ] Bug report (encountered problems with youtube-dl)
- [x] Site support request (request for adding support for a new site)
- [ ] Feature request (request for a new functionality)
- [ ] Question
- [ ] Other

---

### If the purpose of this *issue* is a *site support request* please provide all kinds of example URLs support for which should be included (replace following example URLs by **yours**):
- Single video: https://nm.reddit.com/r/Cricket/comments/8idvby/lousy_cameraman_finds_himself_in_cairns_line_of/


Note that **youtube-dl does not support sites dedicated to [copyright infringement](https://github.com/rg3/youtube-dl#can-you-add-support-for-this-anime-video-site-or-site-which-shows-current-movies-for-free)**. In order for site support request to be accepted all provided example URLs should not violate any copyrights.

---

### Description of your *issue*, suggested solution and other information

Various subs use dm or nm subdomain which apply different css, there's also np subdomain which does the same. reddit also has a massive number of [2 alphabet subdomains to serve the site in different languages](https://np.reddit.com/r/redditdev/comments/2dh18g/is_there_a_list_of_redditcom_subdomains_not/).

youtube-dl already supports www and old, but it's not possible to add support for each and every one of them so it'd be better to ignore it altogether since it doesn't affect reddit detection or .json API availability.

I'll submit a PR if this solution is acceptable.

--- 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/reddit.py`
Content:
```
1 from __future__ import unicode_literals
2 
3 import re
4 
5 from .common import InfoExtractor
6 from ..utils import (
7     ExtractorError,
8     int_or_none,
9     float_or_none,
10 )
11 
12 
13 class RedditIE(InfoExtractor):
14     _VALID_URL = r'https?://v\.redd\.it/(?P<id>[^/?#&]+)'
15     _TEST = {
16         # from https://www.reddit.com/r/videos/comments/6rrwyj/that_small_heart_attack/
17         'url': 'https://v.redd.it/zv89llsvexdz',
18         'md5': '0a070c53eba7ec4534d95a5a1259e253',
19         'info_dict': {
20             'id': 'zv89llsvexdz',
21             'ext': 'mp4',
22             'title': 'zv89llsvexdz',
23         },
24         'params': {
25             'format': 'bestvideo',
26         },
27     }
28 
29     def _real_extract(self, url):
30         video_id = self._match_id(url)
31 
32         formats = self._extract_m3u8_formats(
33             'https://v.redd.it/%s/HLSPlaylist.m3u8' % video_id, video_id,
34             'mp4', entry_protocol='m3u8_native', m3u8_id='hls', fatal=False)
35 
36         formats.extend(self._extract_mpd_formats(
37             'https://v.redd.it/%s/DASHPlaylist.mpd' % video_id, video_id,
38             mpd_id='dash', fatal=False))
39 
40         self._sort_formats(formats)
41 
42         return {
43             'id': video_id,
44             'title': video_id,
45             'formats': formats,
46         }
47 
48 
49 class RedditRIE(InfoExtractor):
50     _VALID_URL = r'(?P<url>https?://(?:(?:www|old)\.)?reddit\.com/r/[^/]+/comments/(?P<id>[^/?#&]+))'
51     _TESTS = [{
52         'url': 'https://www.reddit.com/r/videos/comments/6rrwyj/that_small_heart_attack/',
53         'info_dict': {
54             'id': 'zv89llsvexdz',
55             'ext': 'mp4',
56             'title': 'That small heart attack.',
57             'thumbnail': r're:^https?://.*\.jpg$',
58             'timestamp': 1501941939,
59             'upload_date': '20170805',
60             'uploader': 'Antw87',
61             'like_count': int,
62             'dislike_count': int,
63             'comment_count': int,
64             'age_limit': 0,
65         },
66         'params': {
67             'format': 'bestvideo',
68             'skip_download': True,
69         },
70     }, {
71         'url': 'https://www.reddit.com/r/videos/comments/6rrwyj',
72         'only_matching': True,
73     }, {
74         # imgur
75         'url': 'https://www.reddit.com/r/MadeMeSmile/comments/6t7wi5/wait_for_it/',
76         'only_matching': True,
77     }, {
78         # imgur @ old reddit
79         'url': 'https://old.reddit.com/r/MadeMeSmile/comments/6t7wi5/wait_for_it/',
80         'only_matching': True,
81     }, {
82         # streamable
83         'url': 'https://www.reddit.com/r/videos/comments/6t7sg9/comedians_hilarious_joke_about_the_guam_flag/',
84         'only_matching': True,
85     }, {
86         # youtube
87         'url': 'https://www.reddit.com/r/videos/comments/6t75wq/southern_man_tries_to_speak_without_an_accent/',
88         'only_matching': True,
89     }]
90 
91     def _real_extract(self, url):
92         mobj = re.match(self._VALID_URL, url)
93         url, video_id = mobj.group('url', 'id')
94 
95         video_id = self._match_id(url)
96 
97         data = self._download_json(
98             url + '/.json', video_id)[0]['data']['children'][0]['data']
99 
100         video_url = data['url']
101 
102         # Avoid recursing into the same reddit URL
103         if 'reddit.com/' in video_url and '/%s/' % video_id in video_url:
104             raise ExtractorError('No media found', expected=True)
105 
106         over_18 = data.get('over_18')
107         if over_18 is True:
108             age_limit = 18
109         elif over_18 is False:
110             age_limit = 0
111         else:
112             age_limit = None
113 
114         return {
115             '_type': 'url_transparent',
116             'url': video_url,
117             'title': data.get('title'),
118             'thumbnail': data.get('thumbnail'),
119             'timestamp': float_or_none(data.get('created_utc')),
120             'uploader': data.get('author'),
121             'like_count': int_or_none(data.get('ups')),
122             'dislike_count': int_or_none(data.get('downs')),
123             'comment_count': int_or_none(data.get('num_comments')),
124             'age_limit': age_limit,
125         }
126
```
--- 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/reddit.py b/youtube_dl/extractor/reddit.py
--- a/youtube_dl/extractor/reddit.py
+++ b/youtube_dl/extractor/reddit.py
@@ -47,7 +47,7 @@
 
 
 class RedditRIE(InfoExtractor):
-    _VALID_URL = r'(?P<url>https?://(?:(?:www|old)\.)?reddit\.com/r/[^/]+/comments/(?P<id>[^/?#&]+))'
+    _VALID_URL = r'(?P<url>https?://(?:[^/]+\.)?reddit\.com/r/[^/]+/comments/(?P<id>[^/?#&]+))'
     _TESTS = [{
         'url': 'https://www.reddit.com/r/videos/comments/6rrwyj/that_small_heart_attack/',
         'info_dict': {
@@ -86,6 +86,10 @@
         # youtube
         'url': 'https://www.reddit.com/r/videos/comments/6t75wq/southern_man_tries_to_speak_without_an_accent/',
         'only_matching': True,
+    }, {
+        # reddit video @ nm reddit
+        'url': 'https://nm.reddit.com/r/Cricket/comments/8idvby/lousy_cameraman_finds_himself_in_cairns_line_of/',
+        'only_matching': True,
     }]
 
     def _real_extract(self, url):

{"golden_diff": "diff --git a/youtube_dl/extractor/reddit.py b/youtube_dl/extractor/reddit.py\n--- a/youtube_dl/extractor/reddit.py\n+++ b/youtube_dl/extractor/reddit.py\n@@ -47,7 +47,7 @@\n \n \n class RedditRIE(InfoExtractor):\n-    _VALID_URL = r'(?P<url>https?://(?:(?:www|old)\\.)?reddit\\.com/r/[^/]+/comments/(?P<id>[^/?#&]+))'\n+    _VALID_URL = r'(?P<url>https?://(?:[^/]+\\.)?reddit\\.com/r/[^/]+/comments/(?P<id>[^/?#&]+))'\n     _TESTS = [{\n         'url': 'https://www.reddit.com/r/videos/comments/6rrwyj/that_small_heart_attack/',\n         'info_dict': {\n@@ -86,6 +86,10 @@\n         # youtube\n         'url': 'https://www.reddit.com/r/videos/comments/6t75wq/southern_man_tries_to_speak_without_an_accent/',\n         'only_matching': True,\n+    }, {\n+        # reddit video @ nm reddit\n+        'url': 'https://nm.reddit.com/r/Cricket/comments/8idvby/lousy_cameraman_finds_himself_in_cairns_line_of/',\n+        'only_matching': True,\n     }]\n \n     def _real_extract(self, url):\n", "issue": "Ignore subdomains on reddit URLs\n### Make sure you are using the *latest* version: run `youtube-dl --version` and ensure your version is *2018.05.09*. If it's not, read [this FAQ entry](https://github.com/rg3/youtube-dl/blob/master/README.md#how-do-i-update-youtube-dl) and update. Issues with outdated version will be rejected.\r\n- [x] I've **verified** and **I assure** that I'm running youtube-dl **2018.05.09**\r\n\r\n### Before submitting an *issue* make sure you have:\r\n- [x] At least skimmed through the [README](https://github.com/rg3/youtube-dl/blob/master/README.md), **most notably** the [FAQ](https://github.com/rg3/youtube-dl#faq) and [BUGS](https://github.com/rg3/youtube-dl#bugs) sections\r\n- [x] [Searched](https://github.com/rg3/youtube-dl/search?type=Issues) the bugtracker for similar issues including closed ones\r\n- [x] Checked that provided video/audio/playlist URLs (if any) are alive and playable in a browser\r\n\r\n### What is the purpose of your *issue*?\r\n- [ ] Bug report (encountered problems with youtube-dl)\r\n- [x] Site support request (request for adding support for a new site)\r\n- [ ] Feature request (request for a new functionality)\r\n- [ ] Question\r\n- [ ] Other\r\n\r\n---\r\n\r\n### If the purpose of this *issue* is a *site support request* please provide all kinds of example URLs support for which should be included (replace following example URLs by **yours**):\r\n- Single video: https://nm.reddit.com/r/Cricket/comments/8idvby/lousy_cameraman_finds_himself_in_cairns_line_of/\r\n\r\n\r\nNote that **youtube-dl does not support sites dedicated to [copyright infringement](https://github.com/rg3/youtube-dl#can-you-add-support-for-this-anime-video-site-or-site-which-shows-current-movies-for-free)**. In order for site support request to be accepted all provided example URLs should not violate any copyrights.\r\n\r\n---\r\n\r\n### Description of your *issue*, suggested solution and other information\r\n\r\nVarious subs use dm or nm subdomain which apply different css, there's also np subdomain which does the same. reddit also has a massive number of [2 alphabet subdomains to serve the site in different languages](https://np.reddit.com/r/redditdev/comments/2dh18g/is_there_a_list_of_redditcom_subdomains_not/).\r\n\r\nyoutube-dl already supports www and old, but it's not possible to add support for each and every one of them so it'd be better to ignore it altogether since it doesn't affect reddit detection or .json API availability.\r\n\r\nI'll submit a PR if this solution is acceptable.\nIgnore subdomains on reddit URLs\n### Make sure you are using the *latest* version: run `youtube-dl --version` and ensure your version is *2018.05.09*. If it's not, read [this FAQ entry](https://github.com/rg3/youtube-dl/blob/master/README.md#how-do-i-update-youtube-dl) and update. Issues with outdated version will be rejected.\r\n- [x] I've **verified** and **I assure** that I'm running youtube-dl **2018.05.09**\r\n\r\n### Before submitting an *issue* make sure you have:\r\n- [x] At least skimmed through the [README](https://github.com/rg3/youtube-dl/blob/master/README.md), **most notably** the [FAQ](https://github.com/rg3/youtube-dl#faq) and [BUGS](https://github.com/rg3/youtube-dl#bugs) sections\r\n- [x] [Searched](https://github.com/rg3/youtube-dl/search?type=Issues) the bugtracker for similar issues including closed ones\r\n- [x] Checked that provided video/audio/playlist URLs (if any) are alive and playable in a browser\r\n\r\n### What is the purpose of your *issue*?\r\n- [ ] Bug report (encountered problems with youtube-dl)\r\n- [x] Site support request (request for adding support for a new site)\r\n- [ ] Feature request (request for a new functionality)\r\n- [ ] Question\r\n- [ ] Other\r\n\r\n---\r\n\r\n### If the purpose of this *issue* is a *site support request* please provide all kinds of example URLs support for which should be included (replace following example URLs by **yours**):\r\n- Single video: https://nm.reddit.com/r/Cricket/comments/8idvby/lousy_cameraman_finds_himself_in_cairns_line_of/\r\n\r\n\r\nNote that **youtube-dl does not support sites dedicated to [copyright infringement](https://github.com/rg3/youtube-dl#can-you-add-support-for-this-anime-video-site-or-site-which-shows-current-movies-for-free)**. In order for site support request to be accepted all provided example URLs should not violate any copyrights.\r\n\r\n---\r\n\r\n### Description of your *issue*, suggested solution and other information\r\n\r\nVarious subs use dm or nm subdomain which apply different css, there's also np subdomain which does the same. reddit also has a massive number of [2 alphabet subdomains to serve the site in different languages](https://np.reddit.com/r/redditdev/comments/2dh18g/is_there_a_list_of_redditcom_subdomains_not/).\r\n\r\nyoutube-dl already supports www and old, but it's not possible to add support for each and every one of them so it'd be better to ignore it altogether since it doesn't affect reddit detection or .json API availability.\r\n\r\nI'll submit a PR if this solution is acceptable.\n", "before_files": [{"content": "from __future__ import unicode_literals\n\nimport re\n\nfrom .common import InfoExtractor\nfrom ..utils import (\n    ExtractorError,\n    int_or_none,\n    float_or_none,\n)\n\n\nclass RedditIE(InfoExtractor):\n    _VALID_URL = r'https?://v\\.redd\\.it/(?P<id>[^/?#&]+)'\n    _TEST = {\n        # from https://www.reddit.com/r/videos/comments/6rrwyj/that_small_heart_attack/\n        'url': 'https://v.redd.it/zv89llsvexdz',\n        'md5': '0a070c53eba7ec4534d95a5a1259e253',\n        'info_dict': {\n            'id': 'zv89llsvexdz',\n            'ext': 'mp4',\n            'title': 'zv89llsvexdz',\n        },\n        'params': {\n            'format': 'bestvideo',\n        },\n    }\n\n    def _real_extract(self, url):\n        video_id = self._match_id(url)\n\n        formats = self._extract_m3u8_formats(\n            'https://v.redd.it/%s/HLSPlaylist.m3u8' % video_id, video_id,\n            'mp4', entry_protocol='m3u8_native', m3u8_id='hls', fatal=False)\n\n        formats.extend(self._extract_mpd_formats(\n            'https://v.redd.it/%s/DASHPlaylist.mpd' % video_id, video_id,\n            mpd_id='dash', fatal=False))\n\n        self._sort_formats(formats)\n\n        return {\n            'id': video_id,\n            'title': video_id,\n            'formats': formats,\n        }\n\n\nclass RedditRIE(InfoExtractor):\n    _VALID_URL = r'(?P<url>https?://(?:(?:www|old)\\.)?reddit\\.com/r/[^/]+/comments/(?P<id>[^/?#&]+))'\n    _TESTS = [{\n        'url': 'https://www.reddit.com/r/videos/comments/6rrwyj/that_small_heart_attack/',\n        'info_dict': {\n            'id': 'zv89llsvexdz',\n            'ext': 'mp4',\n            'title': 'That small heart attack.',\n            'thumbnail': r're:^https?://.*\\.jpg$',\n            'timestamp': 1501941939,\n            'upload_date': '20170805',\n            'uploader': 'Antw87',\n            'like_count': int,\n            'dislike_count': int,\n            'comment_count': int,\n            'age_limit': 0,\n        },\n        'params': {\n            'format': 'bestvideo',\n            'skip_download': True,\n        },\n    }, {\n        'url': 'https://www.reddit.com/r/videos/comments/6rrwyj',\n        'only_matching': True,\n    }, {\n        # imgur\n        'url': 'https://www.reddit.com/r/MadeMeSmile/comments/6t7wi5/wait_for_it/',\n        'only_matching': True,\n    }, {\n        # imgur @ old reddit\n        'url': 'https://old.reddit.com/r/MadeMeSmile/comments/6t7wi5/wait_for_it/',\n        'only_matching': True,\n    }, {\n        # streamable\n        'url': 'https://www.reddit.com/r/videos/comments/6t7sg9/comedians_hilarious_joke_about_the_guam_flag/',\n        'only_matching': True,\n    }, {\n        # youtube\n        'url': 'https://www.reddit.com/r/videos/comments/6t75wq/southern_man_tries_to_speak_without_an_accent/',\n        'only_matching': True,\n    }]\n\n    def _real_extract(self, url):\n        mobj = re.match(self._VALID_URL, url)\n        url, video_id = mobj.group('url', 'id')\n\n        video_id = self._match_id(url)\n\n        data = self._download_json(\n            url + '/.json', video_id)[0]['data']['children'][0]['data']\n\n        video_url = data['url']\n\n        # Avoid recursing into the same reddit URL\n        if 'reddit.com/' in video_url and '/%s/' % video_id in video_url:\n            raise ExtractorError('No media found', expected=True)\n\n        over_18 = data.get('over_18')\n        if over_18 is True:\n            age_limit = 18\n        elif over_18 is False:\n            age_limit = 0\n        else:\n            age_limit = None\n\n        return {\n            '_type': 'url_transparent',\n            'url': video_url,\n            'title': data.get('title'),\n            'thumbnail': data.get('thumbnail'),\n            'timestamp': float_or_none(data.get('created_utc')),\n            'uploader': data.get('author'),\n            'like_count': int_or_none(data.get('ups')),\n            'dislike_count': int_or_none(data.get('downs')),\n            'comment_count': int_or_none(data.get('num_comments')),\n            'age_limit': age_limit,\n        }\n", "path": "youtube_dl/extractor/reddit.py"}], "after_files": [{"content": "from __future__ import unicode_literals\n\nimport re\n\nfrom .common import InfoExtractor\nfrom ..utils import (\n    ExtractorError,\n    int_or_none,\n    float_or_none,\n)\n\n\nclass RedditIE(InfoExtractor):\n    _VALID_URL = r'https?://v\\.redd\\.it/(?P<id>[^/?#&]+)'\n    _TEST = {\n        # from https://www.reddit.com/r/videos/comments/6rrwyj/that_small_heart_attack/\n        'url': 'https://v.redd.it/zv89llsvexdz',\n        'md5': '0a070c53eba7ec4534d95a5a1259e253',\n        'info_dict': {\n            'id': 'zv89llsvexdz',\n            'ext': 'mp4',\n            'title': 'zv89llsvexdz',\n        },\n        'params': {\n            'format': 'bestvideo',\n        },\n    }\n\n    def _real_extract(self, url):\n        video_id = self._match_id(url)\n\n        formats = self._extract_m3u8_formats(\n            'https://v.redd.it/%s/HLSPlaylist.m3u8' % video_id, video_id,\n            'mp4', entry_protocol='m3u8_native', m3u8_id='hls', fatal=False)\n\n        formats.extend(self._extract_mpd_formats(\n            'https://v.redd.it/%s/DASHPlaylist.mpd' % video_id, video_id,\n            mpd_id='dash', fatal=False))\n\n        self._sort_formats(formats)\n\n        return {\n            'id': video_id,\n            'title': video_id,\n            'formats': formats,\n        }\n\n\nclass RedditRIE(InfoExtractor):\n    _VALID_URL = r'(?P<url>https?://(?:[^/]+\\.)?reddit\\.com/r/[^/]+/comments/(?P<id>[^/?#&]+))'\n    _TESTS = [{\n        'url': 'https://www.reddit.com/r/videos/comments/6rrwyj/that_small_heart_attack/',\n        'info_dict': {\n            'id': 'zv89llsvexdz',\n            'ext': 'mp4',\n            'title': 'That small heart attack.',\n            'thumbnail': r're:^https?://.*\\.jpg$',\n            'timestamp': 1501941939,\n            'upload_date': '20170805',\n            'uploader': 'Antw87',\n            'like_count': int,\n            'dislike_count': int,\n            'comment_count': int,\n            'age_limit': 0,\n        },\n        'params': {\n            'format': 'bestvideo',\n            'skip_download': True,\n        },\n    }, {\n        'url': 'https://www.reddit.com/r/videos/comments/6rrwyj',\n        'only_matching': True,\n    }, {\n        # imgur\n        'url': 'https://www.reddit.com/r/MadeMeSmile/comments/6t7wi5/wait_for_it/',\n        'only_matching': True,\n    }, {\n        # imgur @ old reddit\n        'url': 'https://old.reddit.com/r/MadeMeSmile/comments/6t7wi5/wait_for_it/',\n        'only_matching': True,\n    }, {\n        # streamable\n        'url': 'https://www.reddit.com/r/videos/comments/6t7sg9/comedians_hilarious_joke_about_the_guam_flag/',\n        'only_matching': True,\n    }, {\n        # youtube\n        'url': 'https://www.reddit.com/r/videos/comments/6t75wq/southern_man_tries_to_speak_without_an_accent/',\n        'only_matching': True,\n    }, {\n        # reddit video @ nm reddit\n        'url': 'https://nm.reddit.com/r/Cricket/comments/8idvby/lousy_cameraman_finds_himself_in_cairns_line_of/',\n        'only_matching': True,\n    }]\n\n    def _real_extract(self, url):\n        mobj = re.match(self._VALID_URL, url)\n        url, video_id = mobj.group('url', 'id')\n\n        video_id = self._match_id(url)\n\n        data = self._download_json(\n            url + '/.json', video_id)[0]['data']['children'][0]['data']\n\n        video_url = data['url']\n\n        # Avoid recursing into the same reddit URL\n        if 'reddit.com/' in video_url and '/%s/' % video_id in video_url:\n            raise ExtractorError('No media found', expected=True)\n\n        over_18 = data.get('over_18')\n        if over_18 is True:\n            age_limit = 18\n        elif over_18 is False:\n            age_limit = 0\n        else:\n            age_limit = None\n\n        return {\n            '_type': 'url_transparent',\n            'url': video_url,\n            'title': data.get('title'),\n            'thumbnail': data.get('thumbnail'),\n            'timestamp': float_or_none(data.get('created_utc')),\n            'uploader': data.get('author'),\n            'like_count': int_or_none(data.get('ups')),\n            'dislike_count': int_or_none(data.get('downs')),\n            'comment_count': int_or_none(data.get('num_comments')),\n            'age_limit': age_limit,\n        }\n", "path": "youtube_dl/extractor/reddit.py"}]}