- 'http://22tracks.com/token.php?desktop=true&u=%2F128%2f{0}'.format(
- filename), track_id, 'Finding download link...')
-
- down_url = 'http://audio.22tracks.com{0}?st={1}&e={2}'.format(
- token['filename'],
- token['st'],
- token['e'])
-
- return down_url
-
- def _real_extract(self, url):
- mobj = re.match(self._VALID_URL, url)
-
- city_id = mobj.group(1)
- genre_id = mobj.group(2)
- track_id = mobj.group(3)
-
- self.to_screen(':: Track ID found! - Downloading single track')
-
- track_info = self._extract_info(city_id, genre_id, track_id)
-
- download_url = self._get_token(track_info['filename'], track_id)
- title = '{0}-{1}'.format(
- track_info['artist'].strip(), track_info['title'].strip())
+ 'http://22tracks.com/token.php?desktop=true&u=/128/%s' % filename,
+ track_id, 'Downloading token', 'Unable to download token')
+ return 'http://audio.22tracks.com%s?st=%s&e=%d' % (token['filename'], token['st'], token['e'])