Skip to content
This repository has been archived by the owner on Jun 21, 2023. It is now read-only.

Commit

Permalink
New encoding and chunkserver path
Browse files Browse the repository at this point in the history
  • Loading branch information
jschwindt committed Aug 28, 2019
1 parent 3439d3d commit cc52d36
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.vscode
venv
__pycache__
build
dist
radiocut_downloader.egg-info
*.pyc
4 changes: 2 additions & 2 deletions radiocut/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ def get_chunks_url(base_url, station, start_folder):
Computes first the (not too) 'obfuscated' code that the new chunks server requires
and returns the final URL.
"""
code = base64.b64encode('win{}|{}dow'.format(station, start_folder).encode('ascii'))
code = base64.b64encode('andaa{}|{}cagar'.format(station, start_folder).encode('ascii'))
code = code.decode('ascii').replace('=', '~').replace('/', '_').replace('+', '-')
url = '{}/server/gec/web/{}/'.format(base_url, code)
url = '{}/server/gec/www/{}/'.format(base_url, code)
return url

def get_audiocut(url, verbose=False, duration=None):
Expand Down

0 comments on commit cc52d36

Please sign in to comment.