aboutsummaryrefslogtreecommitdiff
path: root/extractors/soundcloud.py
blob: e7c7e0b35b14f6084236899b926c7d2431d3d2ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import re
import logging
import requests
from bs4 import BeautifulSoup

from .common import Extractor

class soundcloud(Extractor):
    pattern = re.compile(r'(http(?:s|):\/\/.*soundcloud.com)(.*)')
    filename_template = "%(uploader)s/%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s"

    def __init__(self, reg, url):
        super().__init__(reg, url)

    def get_albums(self):
        # We directly use youtube-dl soudcloud albums management
        # (It download all songs by an artist
        self._albums.append(self.root + self.path)