Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local address = ...
- local bitrate = 48
- local l_bitrate = bitrate
- local base_site = "http://dfpwm.catgirl.services"
- local base_bitrate = 48
- local base_conv_url = base_site .. "/aconv"
- function getId(str)
- local id, _a, _b
- if string.find(str, "youtube.com") then
- _a, _b, id = string.find(str, "v=([a-zA-Z0-9_-]+)")
- elseif string.find(str, "youtu.be/") then
- _a, _b, id = string.find(str, "be/([a-zA-Z0-9_-]+)")
- else
- id = str
- end
- return id
- end
- function downloadAudio(id)
- print("Downloading " .. id)
- local url = base_conv_url .. (tostring(l_bitrate) or "") .. "/" .. id
- return url
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement