We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[ PornFlip ] Regex Invalid
## Please follow the guide below

- You will be asked some questions and requested to provide some information, please read them **carefully** and answer honestly
- Put an `x` into all the boxes [ ] relevant to your *issue* (like this: `[x]`)
- Use the *Preview* tab to see what your issue will actually look like

---

### Make sure you are using the *latest* version: run `youtube-dl --version` and ensure your version is *2017.10.01*. 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 **2017.10.01**

### 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

### What is the purpose of your *issue*?
- [x] Bug report (encountered problems with youtube-dl)
- [ ] 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 *bug report*, *site support request* or you are not completely sure provide the full verbose output as follows:

Add the `-v` flag to **your command line** you run youtube-dl with (`youtube-dl -v <your command line>`), copy the **whole** output and insert it here. It should look similar to one below (replace it with **your** log inserted between triple ```):

```
youtube-dl --verbose -J https://www.pornflip.com/v/EkRD6-vS2-s
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'--verbose', u'-J', u'https://www.pornflip.com/v/EkRD6-vS2-s']
[debug] Encodings: locale UTF-8, fs UTF-8, out None, pref UTF-8
[debug] youtube-dl version 2017.10.01
[debug] Python version 2.7.12 - Linux-4.4.0-96-generic-x86_64-with-Ubuntu-16.04-xenial
[debug] exe versions: none
[debug] Proxy map: {}
WARNING: Falling back on generic information extractor.
WARNING: Failed to download MPD manifest: HTTP Error 404: Not Found
ERROR: Unsupported URL: https://www.pornflip.com/v/EkRD6-vS2-s
Traceback (most recent call last):
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/generic.py", line 2156, in _real_extract
    doc = compat_etree_fromstring(webpage.encode('utf-8'))
  File "/usr/local/bin/youtube-dl/youtube_dl/compat.py", line 2539, in compat_etree_fromstring
    doc = _XML(text, parser=etree.XMLParser(target=_TreeBuilder(element_factory=_element_factory)))
  File "/usr/local/bin/youtube-dl/youtube_dl/compat.py", line 2528, in _XML
    parser.feed(text)
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1653, in feed
    self._raiseerror(v)
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1517, in _raiseerror
    raise err
ParseError: mismatched tag: line 21, column 2
Traceback (most recent call last):
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 783, in extract_info
    ie_result = ie.extract(url)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 434, in extract
    ie_result = self._real_extract(url)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/generic.py", line 3051, in _real_extract
    raise UnsupportedError(url)
UnsupportedError: Unsupported URL: https://www.pornflip.com/v/EkRD6-vS2-s
```

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

Regex Valid:
```
_VALID_URL = r'https?://(?:www\.)?pornflip\.com/(?:v|embed)/(?P<id>[0-9A-Za-z-]{11})'
```

[ PornFlip ] Regex Invalid
## Please follow the guide below

- You will be asked some questions and requested to provide some information, please read them **carefully** and answer honestly
- Put an `x` into all the boxes [ ] relevant to your *issue* (like this: `[x]`)
- Use the *Preview* tab to see what your issue will actually look like

---

### Make sure you are using the *latest* version: run `youtube-dl --version` and ensure your version is *2017.10.01*. 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 **2017.10.01**

### 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

### What is the purpose of your *issue*?
- [x] Bug report (encountered problems with youtube-dl)
- [ ] 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 *bug report*, *site support request* or you are not completely sure provide the full verbose output as follows:

Add the `-v` flag to **your command line** you run youtube-dl with (`youtube-dl -v <your command line>`), copy the **whole** output and insert it here. It should look similar to one below (replace it with **your** log inserted between triple ```):

```
youtube-dl --verbose -J https://www.pornflip.com/v/EkRD6-vS2-s
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'--verbose', u'-J', u'https://www.pornflip.com/v/EkRD6-vS2-s']
[debug] Encodings: locale UTF-8, fs UTF-8, out None, pref UTF-8
[debug] youtube-dl version 2017.10.01
[debug] Python version 2.7.12 - Linux-4.4.0-96-generic-x86_64-with-Ubuntu-16.04-xenial
[debug] exe versions: none
[debug] Proxy map: {}
WARNING: Falling back on generic information extractor.
WARNING: Failed to download MPD manifest: HTTP Error 404: Not Found
ERROR: Unsupported URL: https://www.pornflip.com/v/EkRD6-vS2-s
Traceback (most recent call last):
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/generic.py", line 2156, in _real_extract
    doc = compat_etree_fromstring(webpage.encode('utf-8'))
  File "/usr/local/bin/youtube-dl/youtube_dl/compat.py", line 2539, in compat_etree_fromstring
    doc = _XML(text, parser=etree.XMLParser(target=_TreeBuilder(element_factory=_element_factory)))
  File "/usr/local/bin/youtube-dl/youtube_dl/compat.py", line 2528, in _XML
    parser.feed(text)
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1653, in feed
    self._raiseerror(v)
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1517, in _raiseerror
    raise err
ParseError: mismatched tag: line 21, column 2
Traceback (most recent call last):
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 783, in extract_info
    ie_result = ie.extract(url)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 434, in extract
    ie_result = self._real_extract(url)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/generic.py", line 3051, in _real_extract
    raise UnsupportedError(url)
UnsupportedError: Unsupported URL: https://www.pornflip.com/v/EkRD6-vS2-s
```

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

Regex Valid:
```
_VALID_URL = r'https?://(?:www\.)?pornflip\.com/(?:v|embed)/(?P<id>[0-9A-Za-z-]{11})'
```


--- 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/pornflip.py`
Content:
```
1 # coding: utf-8
2 from __future__ import unicode_literals
3 
4 from .common import InfoExtractor
5 from ..compat import (
6     compat_parse_qs,
7     compat_str,
8 )
9 from ..utils import (
10     int_or_none,
11     try_get,
12     unified_timestamp,
13 )
14 
15 
16 class PornFlipIE(InfoExtractor):
17     _VALID_URL = r'https?://(?:www\.)?pornflip\.com/(?:v|embed)/(?P<id>[0-9A-Za-z]{11})'
18     _TESTS = [{
19         'url': 'https://www.pornflip.com/v/wz7DfNhMmep',
20         'md5': '98c46639849145ae1fd77af532a9278c',
21         'info_dict': {
22             'id': 'wz7DfNhMmep',
23             'ext': 'mp4',
24             'title': '2 Amateurs swallow make his dream cumshots true',
25             'thumbnail': r're:^https?://.*\.jpg$',
26             'duration': 112,
27             'timestamp': 1481655502,
28             'upload_date': '20161213',
29             'uploader_id': '106786',
30             'uploader': 'figifoto',
31             'view_count': int,
32             'age_limit': 18,
33         }
34     }, {
35         'url': 'https://www.pornflip.com/embed/wz7DfNhMmep',
36         'only_matching': True,
37     }]
38 
39     def _real_extract(self, url):
40         video_id = self._match_id(url)
41 
42         webpage = self._download_webpage(
43             'https://www.pornflip.com/v/%s' % video_id, video_id)
44 
45         flashvars = compat_parse_qs(self._search_regex(
46             r'<embed[^>]+flashvars=(["\'])(?P<flashvars>(?:(?!\1).)+)\1',
47             webpage, 'flashvars', group='flashvars'))
48 
49         title = flashvars['video_vars[title]'][0]
50 
51         def flashvar(kind):
52             return try_get(
53                 flashvars, lambda x: x['video_vars[%s]' % kind][0], compat_str)
54 
55         formats = []
56         for key, value in flashvars.items():
57             if not (value and isinstance(value, list)):
58                 continue
59             format_url = value[0]
60             if key == 'video_vars[hds_manifest]':
61                 formats.extend(self._extract_mpd_formats(
62                     format_url, video_id, mpd_id='dash', fatal=False))
63                 continue
64             height = self._search_regex(
65                 r'video_vars\[video_urls\]\[(\d+)', key, 'height', default=None)
66             if not height:
67                 continue
68             formats.append({
69                 'url': format_url,
70                 'format_id': 'http-%s' % height,
71                 'height': int_or_none(height),
72             })
73         self._sort_formats(formats)
74 
75         uploader = self._html_search_regex(
76             (r'<span[^>]+class="name"[^>]*>\s*<a[^>]+>\s*<strong>(?P<uploader>[^<]+)',
77              r'<meta[^>]+content=(["\'])[^>]*\buploaded by (?P<uploader>.+?)\1'),
78             webpage, 'uploader', fatal=False, group='uploader')
79 
80         return {
81             'id': video_id,
82             'formats': formats,
83             'title': title,
84             'thumbnail': flashvar('big_thumb'),
85             'duration': int_or_none(flashvar('duration')),
86             'timestamp': unified_timestamp(self._html_search_meta(
87                 'uploadDate', webpage, 'timestamp')),
88             'uploader_id': flashvar('author_id'),
89             'uploader': uploader,
90             'view_count': int_or_none(flashvar('views')),
91             'age_limit': 18,
92         }
93
```
--- 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/pornflip.py b/youtube_dl/extractor/pornflip.py
--- a/youtube_dl/extractor/pornflip.py
+++ b/youtube_dl/extractor/pornflip.py
@@ -14,7 +14,7 @@
 
 
 class PornFlipIE(InfoExtractor):
-    _VALID_URL = r'https?://(?:www\.)?pornflip\.com/(?:v|embed)/(?P<id>[0-9A-Za-z]{11})'
+    _VALID_URL = r'https?://(?:www\.)?pornflip\.com/(?:v|embed)/(?P<id>[0-9A-Za-z-]{11})'
     _TESTS = [{
         'url': 'https://www.pornflip.com/v/wz7DfNhMmep',
         'md5': '98c46639849145ae1fd77af532a9278c',
@@ -34,6 +34,12 @@
     }, {
         'url': 'https://www.pornflip.com/embed/wz7DfNhMmep',
         'only_matching': True,
+    }, {
+        'url': 'https://www.pornflip.com/v/EkRD6-vS2-s',
+        'only_matching': True,
+    }, {
+        'url': 'https://www.pornflip.com/embed/EkRD6-vS2-s',
+        'only_matching': True,
     }]
 
     def _real_extract(self, url):

{"golden_diff": "diff --git a/youtube_dl/extractor/pornflip.py b/youtube_dl/extractor/pornflip.py\n--- a/youtube_dl/extractor/pornflip.py\n+++ b/youtube_dl/extractor/pornflip.py\n@@ -14,7 +14,7 @@\n \n \n class PornFlipIE(InfoExtractor):\n-    _VALID_URL = r'https?://(?:www\\.)?pornflip\\.com/(?:v|embed)/(?P<id>[0-9A-Za-z]{11})'\n+    _VALID_URL = r'https?://(?:www\\.)?pornflip\\.com/(?:v|embed)/(?P<id>[0-9A-Za-z-]{11})'\n     _TESTS = [{\n         'url': 'https://www.pornflip.com/v/wz7DfNhMmep',\n         'md5': '98c46639849145ae1fd77af532a9278c',\n@@ -34,6 +34,12 @@\n     }, {\n         'url': 'https://www.pornflip.com/embed/wz7DfNhMmep',\n         'only_matching': True,\n+    }, {\n+        'url': 'https://www.pornflip.com/v/EkRD6-vS2-s',\n+        'only_matching': True,\n+    }, {\n+        'url': 'https://www.pornflip.com/embed/EkRD6-vS2-s',\n+        'only_matching': True,\n     }]\n \n     def _real_extract(self, url):\n", "issue": "[ PornFlip ] Regex Invalid\n## Please follow the guide below\r\n\r\n- You will be asked some questions and requested to provide some information, please read them **carefully** and answer honestly\r\n- Put an `x` into all the boxes [ ] relevant to your *issue* (like this: `[x]`)\r\n- Use the *Preview* tab to see what your issue will actually look like\r\n\r\n---\r\n\r\n### Make sure you are using the *latest* version: run `youtube-dl --version` and ensure your version is *2017.10.01*. 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 **2017.10.01**\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\r\n### What is the purpose of your *issue*?\r\n- [x] Bug report (encountered problems with youtube-dl)\r\n- [ ] 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### If the purpose of this *issue* is a *bug report*, *site support request* or you are not completely sure provide the full verbose output as follows:\r\n\r\nAdd the `-v` flag to **your command line** you run youtube-dl with (`youtube-dl -v <your command line>`), copy the **whole** output and insert it here. It should look similar to one below (replace it with **your** log inserted between triple ```):\r\n\r\n```\r\nyoutube-dl --verbose -J https://www.pornflip.com/v/EkRD6-vS2-s\r\n[debug] System config: []\r\n[debug] User config: []\r\n[debug] Custom config: []\r\n[debug] Command-line args: [u'--verbose', u'-J', u'https://www.pornflip.com/v/EkRD6-vS2-s']\r\n[debug] Encodings: locale UTF-8, fs UTF-8, out None, pref UTF-8\r\n[debug] youtube-dl version 2017.10.01\r\n[debug] Python version 2.7.12 - Linux-4.4.0-96-generic-x86_64-with-Ubuntu-16.04-xenial\r\n[debug] exe versions: none\r\n[debug] Proxy map: {}\r\nWARNING: Falling back on generic information extractor.\r\nWARNING: Failed to download MPD manifest: HTTP Error 404: Not Found\r\nERROR: Unsupported URL: https://www.pornflip.com/v/EkRD6-vS2-s\r\nTraceback (most recent call last):\r\n  File \"/usr/local/bin/youtube-dl/youtube_dl/extractor/generic.py\", line 2156, in _real_extract\r\n    doc = compat_etree_fromstring(webpage.encode('utf-8'))\r\n  File \"/usr/local/bin/youtube-dl/youtube_dl/compat.py\", line 2539, in compat_etree_fromstring\r\n    doc = _XML(text, parser=etree.XMLParser(target=_TreeBuilder(element_factory=_element_factory)))\r\n  File \"/usr/local/bin/youtube-dl/youtube_dl/compat.py\", line 2528, in _XML\r\n    parser.feed(text)\r\n  File \"/usr/lib/python2.7/xml/etree/ElementTree.py\", line 1653, in feed\r\n    self._raiseerror(v)\r\n  File \"/usr/lib/python2.7/xml/etree/ElementTree.py\", line 1517, in _raiseerror\r\n    raise err\r\nParseError: mismatched tag: line 21, column 2\r\nTraceback (most recent call last):\r\n  File \"/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py\", line 783, in extract_info\r\n    ie_result = ie.extract(url)\r\n  File \"/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py\", line 434, in extract\r\n    ie_result = self._real_extract(url)\r\n  File \"/usr/local/bin/youtube-dl/youtube_dl/extractor/generic.py\", line 3051, in _real_extract\r\n    raise UnsupportedError(url)\r\nUnsupportedError: Unsupported URL: https://www.pornflip.com/v/EkRD6-vS2-s\r\n```\r\n\r\n### Description of your *issue*, suggested solution and other information\r\n\r\nRegex Valid:\r\n```\r\n_VALID_URL = r'https?://(?:www\\.)?pornflip\\.com/(?:v|embed)/(?P<id>[0-9A-Za-z-]{11})'\r\n```\r\n\n[ PornFlip ] Regex Invalid\n## Please follow the guide below\r\n\r\n- You will be asked some questions and requested to provide some information, please read them **carefully** and answer honestly\r\n- Put an `x` into all the boxes [ ] relevant to your *issue* (like this: `[x]`)\r\n- Use the *Preview* tab to see what your issue will actually look like\r\n\r\n---\r\n\r\n### Make sure you are using the *latest* version: run `youtube-dl --version` and ensure your version is *2017.10.01*. 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 **2017.10.01**\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\r\n### What is the purpose of your *issue*?\r\n- [x] Bug report (encountered problems with youtube-dl)\r\n- [ ] 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### If the purpose of this *issue* is a *bug report*, *site support request* or you are not completely sure provide the full verbose output as follows:\r\n\r\nAdd the `-v` flag to **your command line** you run youtube-dl with (`youtube-dl -v <your command line>`), copy the **whole** output and insert it here. It should look similar to one below (replace it with **your** log inserted between triple ```):\r\n\r\n```\r\nyoutube-dl --verbose -J https://www.pornflip.com/v/EkRD6-vS2-s\r\n[debug] System config: []\r\n[debug] User config: []\r\n[debug] Custom config: []\r\n[debug] Command-line args: [u'--verbose', u'-J', u'https://www.pornflip.com/v/EkRD6-vS2-s']\r\n[debug] Encodings: locale UTF-8, fs UTF-8, out None, pref UTF-8\r\n[debug] youtube-dl version 2017.10.01\r\n[debug] Python version 2.7.12 - Linux-4.4.0-96-generic-x86_64-with-Ubuntu-16.04-xenial\r\n[debug] exe versions: none\r\n[debug] Proxy map: {}\r\nWARNING: Falling back on generic information extractor.\r\nWARNING: Failed to download MPD manifest: HTTP Error 404: Not Found\r\nERROR: Unsupported URL: https://www.pornflip.com/v/EkRD6-vS2-s\r\nTraceback (most recent call last):\r\n  File \"/usr/local/bin/youtube-dl/youtube_dl/extractor/generic.py\", line 2156, in _real_extract\r\n    doc = compat_etree_fromstring(webpage.encode('utf-8'))\r\n  File \"/usr/local/bin/youtube-dl/youtube_dl/compat.py\", line 2539, in compat_etree_fromstring\r\n    doc = _XML(text, parser=etree.XMLParser(target=_TreeBuilder(element_factory=_element_factory)))\r\n  File \"/usr/local/bin/youtube-dl/youtube_dl/compat.py\", line 2528, in _XML\r\n    parser.feed(text)\r\n  File \"/usr/lib/python2.7/xml/etree/ElementTree.py\", line 1653, in feed\r\n    self._raiseerror(v)\r\n  File \"/usr/lib/python2.7/xml/etree/ElementTree.py\", line 1517, in _raiseerror\r\n    raise err\r\nParseError: mismatched tag: line 21, column 2\r\nTraceback (most recent call last):\r\n  File \"/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py\", line 783, in extract_info\r\n    ie_result = ie.extract(url)\r\n  File \"/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py\", line 434, in extract\r\n    ie_result = self._real_extract(url)\r\n  File \"/usr/local/bin/youtube-dl/youtube_dl/extractor/generic.py\", line 3051, in _real_extract\r\n    raise UnsupportedError(url)\r\nUnsupportedError: Unsupported URL: https://www.pornflip.com/v/EkRD6-vS2-s\r\n```\r\n\r\n### Description of your *issue*, suggested solution and other information\r\n\r\nRegex Valid:\r\n```\r\n_VALID_URL = r'https?://(?:www\\.)?pornflip\\.com/(?:v|embed)/(?P<id>[0-9A-Za-z-]{11})'\r\n```\r\n\n", "before_files": [{"content": "# coding: utf-8\nfrom __future__ import unicode_literals\n\nfrom .common import InfoExtractor\nfrom ..compat import (\n    compat_parse_qs,\n    compat_str,\n)\nfrom ..utils import (\n    int_or_none,\n    try_get,\n    unified_timestamp,\n)\n\n\nclass PornFlipIE(InfoExtractor):\n    _VALID_URL = r'https?://(?:www\\.)?pornflip\\.com/(?:v|embed)/(?P<id>[0-9A-Za-z]{11})'\n    _TESTS = [{\n        'url': 'https://www.pornflip.com/v/wz7DfNhMmep',\n        'md5': '98c46639849145ae1fd77af532a9278c',\n        'info_dict': {\n            'id': 'wz7DfNhMmep',\n            'ext': 'mp4',\n            'title': '2 Amateurs swallow make his dream cumshots true',\n            'thumbnail': r're:^https?://.*\\.jpg$',\n            'duration': 112,\n            'timestamp': 1481655502,\n            'upload_date': '20161213',\n            'uploader_id': '106786',\n            'uploader': 'figifoto',\n            'view_count': int,\n            'age_limit': 18,\n        }\n    }, {\n        'url': 'https://www.pornflip.com/embed/wz7DfNhMmep',\n        'only_matching': True,\n    }]\n\n    def _real_extract(self, url):\n        video_id = self._match_id(url)\n\n        webpage = self._download_webpage(\n            'https://www.pornflip.com/v/%s' % video_id, video_id)\n\n        flashvars = compat_parse_qs(self._search_regex(\n            r'<embed[^>]+flashvars=([\"\\'])(?P<flashvars>(?:(?!\\1).)+)\\1',\n            webpage, 'flashvars', group='flashvars'))\n\n        title = flashvars['video_vars[title]'][0]\n\n        def flashvar(kind):\n            return try_get(\n                flashvars, lambda x: x['video_vars[%s]' % kind][0], compat_str)\n\n        formats = []\n        for key, value in flashvars.items():\n            if not (value and isinstance(value, list)):\n                continue\n            format_url = value[0]\n            if key == 'video_vars[hds_manifest]':\n                formats.extend(self._extract_mpd_formats(\n                    format_url, video_id, mpd_id='dash', fatal=False))\n                continue\n            height = self._search_regex(\n                r'video_vars\\[video_urls\\]\\[(\\d+)', key, 'height', default=None)\n            if not height:\n                continue\n            formats.append({\n                'url': format_url,\n                'format_id': 'http-%s' % height,\n                'height': int_or_none(height),\n            })\n        self._sort_formats(formats)\n\n        uploader = self._html_search_regex(\n            (r'<span[^>]+class=\"name\"[^>]*>\\s*<a[^>]+>\\s*<strong>(?P<uploader>[^<]+)',\n             r'<meta[^>]+content=([\"\\'])[^>]*\\buploaded by (?P<uploader>.+?)\\1'),\n            webpage, 'uploader', fatal=False, group='uploader')\n\n        return {\n            'id': video_id,\n            'formats': formats,\n            'title': title,\n            'thumbnail': flashvar('big_thumb'),\n            'duration': int_or_none(flashvar('duration')),\n            'timestamp': unified_timestamp(self._html_search_meta(\n                'uploadDate', webpage, 'timestamp')),\n            'uploader_id': flashvar('author_id'),\n            'uploader': uploader,\n            'view_count': int_or_none(flashvar('views')),\n            'age_limit': 18,\n        }\n", "path": "youtube_dl/extractor/pornflip.py"}], "after_files": [{"content": "# coding: utf-8\nfrom __future__ import unicode_literals\n\nfrom .common import InfoExtractor\nfrom ..compat import (\n    compat_parse_qs,\n    compat_str,\n)\nfrom ..utils import (\n    int_or_none,\n    try_get,\n    unified_timestamp,\n)\n\n\nclass PornFlipIE(InfoExtractor):\n    _VALID_URL = r'https?://(?:www\\.)?pornflip\\.com/(?:v|embed)/(?P<id>[0-9A-Za-z-]{11})'\n    _TESTS = [{\n        'url': 'https://www.pornflip.com/v/wz7DfNhMmep',\n        'md5': '98c46639849145ae1fd77af532a9278c',\n        'info_dict': {\n            'id': 'wz7DfNhMmep',\n            'ext': 'mp4',\n            'title': '2 Amateurs swallow make his dream cumshots true',\n            'thumbnail': r're:^https?://.*\\.jpg$',\n            'duration': 112,\n            'timestamp': 1481655502,\n            'upload_date': '20161213',\n            'uploader_id': '106786',\n            'uploader': 'figifoto',\n            'view_count': int,\n            'age_limit': 18,\n        }\n    }, {\n        'url': 'https://www.pornflip.com/embed/wz7DfNhMmep',\n        'only_matching': True,\n    }, {\n        'url': 'https://www.pornflip.com/v/EkRD6-vS2-s',\n        'only_matching': True,\n    }, {\n        'url': 'https://www.pornflip.com/embed/EkRD6-vS2-s',\n        'only_matching': True,\n    }]\n\n    def _real_extract(self, url):\n        video_id = self._match_id(url)\n\n        webpage = self._download_webpage(\n            'https://www.pornflip.com/v/%s' % video_id, video_id)\n\n        flashvars = compat_parse_qs(self._search_regex(\n            r'<embed[^>]+flashvars=([\"\\'])(?P<flashvars>(?:(?!\\1).)+)\\1',\n            webpage, 'flashvars', group='flashvars'))\n\n        title = flashvars['video_vars[title]'][0]\n\n        def flashvar(kind):\n            return try_get(\n                flashvars, lambda x: x['video_vars[%s]' % kind][0], compat_str)\n\n        formats = []\n        for key, value in flashvars.items():\n            if not (value and isinstance(value, list)):\n                continue\n            format_url = value[0]\n            if key == 'video_vars[hds_manifest]':\n                formats.extend(self._extract_mpd_formats(\n                    format_url, video_id, mpd_id='dash', fatal=False))\n                continue\n            height = self._search_regex(\n                r'video_vars\\[video_urls\\]\\[(\\d+)', key, 'height', default=None)\n            if not height:\n                continue\n            formats.append({\n                'url': format_url,\n                'format_id': 'http-%s' % height,\n                'height': int_or_none(height),\n            })\n        self._sort_formats(formats)\n\n        uploader = self._html_search_regex(\n            (r'<span[^>]+class=\"name\"[^>]*>\\s*<a[^>]+>\\s*<strong>(?P<uploader>[^<]+)',\n             r'<meta[^>]+content=([\"\\'])[^>]*\\buploaded by (?P<uploader>.+?)\\1'),\n            webpage, 'uploader', fatal=False, group='uploader')\n\n        return {\n            'id': video_id,\n            'formats': formats,\n            'title': title,\n            'thumbnail': flashvar('big_thumb'),\n            'duration': int_or_none(flashvar('duration')),\n            'timestamp': unified_timestamp(self._html_search_meta(\n                'uploadDate', webpage, 'timestamp')),\n            'uploader_id': flashvar('author_id'),\n            'uploader': uploader,\n            'view_count': int_or_none(flashvar('views')),\n            'age_limit': 18,\n        }\n", "path": "youtube_dl/extractor/pornflip.py"}]}