diff options
| author | Noémi Ványi <kvch@users.noreply.github.com> | 2020-09-12 14:51:35 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-09-12 14:51:35 +0200 |
| commit | 2370234d0978f59dd62efa4a4931e41ad31444d1 (patch) | |
| tree | d3863e22b3d34092484146ce0bdc6e0ca8d36216 /searx/engines/soundcloud.py | |
| parent | 272158944bf13503e2597018fc60a00baddec660 (diff) | |
| parent | bdac99d4f0349a71d7ecb9a4c61687356afedd6b (diff) | |
Merge pull request #2137 from dalf/drop-python-2
Drop Python 2
Diffstat (limited to 'searx/engines/soundcloud.py')
| -rw-r--r-- | searx/engines/soundcloud.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/searx/engines/soundcloud.py b/searx/engines/soundcloud.py index 284689bf6..5165ea3ea 100644 --- a/searx/engines/soundcloud.py +++ b/searx/engines/soundcloud.py @@ -14,14 +14,11 @@ import re from json import loads from lxml import html from dateutil import parser +from io import StringIO +from urllib.parse import quote_plus, urlencode from searx import logger from searx.poolrequests import get as http_get -from searx.url_utils import quote_plus, urlencode -try: - from cStringIO import StringIO -except: - from io import StringIO # engine dependent config categories = ['music'] @@ -61,7 +58,7 @@ def get_client_id(): # gets app_js and searches for the clientid response = http_get(app_js_url) if response.ok: - cids = cid_re.search(response.content.decode("utf-8")) + cids = cid_re.search(response.content.decode()) if cids is not None and len(cids.groups()): return cids.groups()[0] logger.warning("Unable to fetch guest client_id from SoundCloud, check parser!") |