diff options
author | neodarz <neodarz@neodarz.net> | 2020-08-15 16:02:14 +0200 |
---|---|---|
committer | neodarz <neodarz@neodarz.net> | 2020-08-15 16:02:14 +0200 |
commit | 631679b041112615c24f665d32ae80466f10cef1 (patch) | |
tree | 97ae3804574fa85527dc634f662e50c87ca86fda | |
parent | 34f3b03dbe4d659a5473a1e09a0e2896e3e3790e (diff) | |
download | music_downloader-631679b041112615c24f665d32ae80466f10cef1.tar.xz music_downloader-631679b041112615c24f665d32ae80466f10cef1.zip |
Be more restrictive on url detection
Diffstat (limited to '')
-rw-r--r-- | extractors/bandcamp.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/extractors/bandcamp.py b/extractors/bandcamp.py index dd18f44..935a2d8 100644 --- a/extractors/bandcamp.py +++ b/extractors/bandcamp.py @@ -17,7 +17,8 @@ class bandcamp(Extractor): soup = BeautifulSoup(r.text, 'html.parser') items = soup.select('a[href]') for item in items: - if '/album' in item['href']: + if '/album' in item['href'] and \ + not item['href'].startswith("http"): url = self.root.rstrip('/') + item['href'] if url not in self._albums: self._albums.append(url) |