Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to download audio #1

Closed
d9k opened this issue Feb 12, 2022 · 2 comments
Closed

Ability to download audio #1

d9k opened this issue Feb 12, 2022 · 2 comments

Comments

@d9k
Copy link

d9k commented Feb 12, 2022

(m4a) Something like this works

import requests, re, urllib.request, urllib.parse

##############################################
#Source : https://github.com/hansengianto
#Date : 28 Oct 2021
##############################################

url = input("Input Smule Audio URL : ")

dl_page_url = f"https://sownloader.com/index.php?url={url}#support-sownloader"

print('dl_page_url:', dl_page_url)

request = requests.get(dl_page_url).text
m4a = re.findall("(?:url\=)(https:\/\/c-cl\.cdn\.smule\.com\/.+m4a)",request)

print('m4a:', m4a)

try:
  split_id = url.split("/")

  print('split_id:', split_id)
  print('split_id[4]:', split_id[4])

  file_name = urllib.parse.unquote(split_id[4])
  print('file_name:', file_name)

  urllib.request.urlretrieve(m4a[1], file_name+".m4a")
  print("Success Download Audio")
except Exception as e:
  print("Error Found : \n"+str(e))
@hansengianto
Copy link
Owner

Hello, I Already Check About Your Code and It's Work

Thankyou, will add this to my code

@d9k
Copy link
Author

d9k commented Feb 14, 2022

@hansengianto, made a Deno version of utility with m4a -> mp3 transcoding and id3 tags correction.

https://github.com/d9k/sownloader_com_client

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants