Repository: ytdl-org/youtube-dl

Issue:
[vrv] AttributeError upon attempting series download
## 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 *2018.03.20*. 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.03.20**

### 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*?
- [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

---

### The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your *issue*

---

### 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 -v "https://vrv.co/series/GRZJ3PKD6/Paradigms-How-We-Know-What-We-Know"
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-v', u'https://vrv.co/series/GRZJ3PKD6/Paradigms-How-We-Know-What-We-Know']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2018.03.20
[debug] Python version 2.7.13 (CPython) - Linux-4.13.0-1-amd64-x86_64-with-debian-9.0
[debug] exe versions: avconv 2.8.6-1, avprobe 2.8.6-1, ffmpeg 2.8.6-1, ffprobe 2.8.6-1, phantomjs 2
[debug] Proxy map: {}
[vrv:series] GRZJ3PKD6: Downloading webpage
Traceback (most recent call last):
  File "/home/jspiros/.virtualenvs/youtube-dl/bin/youtube-dl", line 11, in <module>
    sys.exit(main())
  File "/home/jspiros/.virtualenvs/youtube-dl/local/lib/python2.7/site-packages/youtube_dl/__init__.py", line 471, in main
    _real_main(argv)
  File "/home/jspiros/.virtualenvs/youtube-dl/local/lib/python2.7/site-packages/youtube_dl/__init__.py", line 461, in _real_main
    retcode = ydl.download(all_urls)
  File "/home/jspiros/.virtualenvs/youtube-dl/local/lib/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 1989, in download
    url, force_generic_extractor=self.params.get('force_generic_extractor', False))
  File "/home/jspiros/.virtualenvs/youtube-dl/local/lib/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 785, in extract_info
    ie_result = ie.extract(url)
  File "/home/jspiros/.virtualenvs/youtube-dl/local/lib/python2.7/site-packages/youtube_dl/extractor/common.py", line 440, in extract
    ie_result = self._real_extract(url)
  File "/home/jspiros/.virtualenvs/youtube-dl/local/lib/python2.7/site-packages/youtube_dl/extractor/vrv.py", line 199, in _real_extract
    'cms:/seasons?series_id=' + series_id, series_id)
  File "/home/jspiros/.virtualenvs/youtube-dl/local/lib/python2.7/site-packages/youtube_dl/extractor/vrv.py", line 68, in _get_cms_resource
    'resource_key': resource_key,
  File "/home/jspiros/.virtualenvs/youtube-dl/local/lib/python2.7/site-packages/youtube_dl/extractor/vrv.py", line 42, in _call_api
    base_string = '&'.join([method, compat_urlparse.quote(base_url, ''), compat_urlparse.quote(encoded_query, '')])
AttributeError: 'module' object has no attribute 'quote'
```

---

### Description of your *issue*, suggested solution and other information

VRV series downloader is referencing a non-existent function causing an AttributeError that would occur for any series download attempt.



Discussion:

Resolving patch:
diff --git a/youtube_dl/extractor/vrv.py b/youtube_dl/extractor/vrv.py
--- a/youtube_dl/extractor/vrv.py
+++ b/youtube_dl/extractor/vrv.py
@@ -12,7 +12,7 @@
 from .common import InfoExtractor
 from ..compat import (
     compat_urllib_parse_urlencode,
-    compat_urlparse,
+    compat_urllib_parse,
 )
 from ..utils import (
     float_or_none,
@@ -39,11 +39,11 @@ def _call_api(self, path, video_id, note, data=None):
             data = json.dumps(data).encode()
             headers['Content-Type'] = 'application/json'
         method = 'POST' if data else 'GET'
-        base_string = '&'.join([method, compat_urlparse.quote(base_url, ''), compat_urlparse.quote(encoded_query, '')])
+        base_string = '&'.join([method, compat_urllib_parse.quote(base_url, ''), compat_urllib_parse.quote(encoded_query, '')])
         oauth_signature = base64.b64encode(hmac.new(
             (self._API_PARAMS['oAuthSecret'] + '&').encode('ascii'),
             base_string.encode(), hashlib.sha1).digest()).decode()
-        encoded_query += '&oauth_signature=' + compat_urlparse.quote(oauth_signature, '')
+        encoded_query += '&oauth_signature=' + compat_urllib_parse.quote(oauth_signature, '')
         return self._download_json(
             '?'.join([base_url, encoded_query]), video_id,
             note='Downloading %s JSON metadata' % note, headers=headers, data=data)


Test patch: