summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Tauber <asciimoo@gmail.com>2019-12-02 13:05:49 +0000
committerGitHub <noreply@github.com>2019-12-02 13:05:49 +0000
commit349697e8030010cb19190a2d2d6cb395da653c81 (patch)
treeccb2e6bce6e4165d9da73b787f2acab966fa8447
parent8721be2f7d37b314b2ce01c29b3fbd6dc03aa3aa (diff)
parent2aa95c16e31ff0d688a06492863b9f2a0c209bfb (diff)
downloadsearxng-349697e8030010cb19190a2d2d6cb395da653c81.tar.gz
searxng-349697e8030010cb19190a2d2d6cb395da653c81.zip
Merge pull request #1757 from return42/fix-sc-id
[fix] soundcloud: URLs of JS sources has been moved
-rw-r--r--searx/engines/soundcloud.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/searx/engines/soundcloud.py b/searx/engines/soundcloud.py
index 870998545..284689bf6 100644
--- a/searx/engines/soundcloud.py
+++ b/searx/engines/soundcloud.py
@@ -51,7 +51,9 @@ def get_client_id():
if response.ok:
tree = html.fromstring(response.content)
- script_tags = tree.xpath("//script[contains(@src, '/assets/app')]")
+ # script_tags has been moved from /assets/app/ to /assets/ path. I
+ # found client_id in https://a-v2.sndcdn.com/assets/49-a0c01933-3.js
+ script_tags = tree.xpath("//script[contains(@src, '/assets/')]")
app_js_urls = [script_tag.get('src') for script_tag in script_tags if script_tag is not None]
# extracts valid app_js urls from soundcloud.com content