on master help sign in
Merge pull request #1757 from return42/fix-sc-id
349697eAdam Tauber
searx/engines/soundcloud.py+3−1
@@ -51,7 +51,9 @@ def get_client_id():
51
51
52 if response.ok:
52 if response.ok:
53 tree = html.fromstring(response.content)
53 tree = html.fromstring(response.content)
54+ # script_tags has been moved from /assets/app/ to /assets/ path. I
55+ # found client_id in https://a-v2.sndcdn.com/assets/49-a0c01933-3.js
54− script_tags = tree.xpath("//script[contains(@src, '/assets/app')]")
56+ script_tags = tree.xpath("//script[contains(@src, '/assets/')]")
55 app_js_urls = [script_tag.get('src') for script_tag in script_tags if script_tag is not None]
57 app_js_urls = [script_tag.get('src') for script_tag in script_tags if script_tag is not None]
56
58
57 # extracts valid app_js urls from soundcloud.com content
59 # extracts valid app_js urls from soundcloud.com content