import urllib.request
from urllib.parse import quote
import string

str = input("请输入抖音视频链接：")
url = 'https://api.tsyinpin.com/douyin_music.php?url=' + str
s = quote(url, safe=string.printable)
with urllib.request.urlopen(s) as response:
    html = response.read()
    print(html.decode("utf-8"))

input("请输入任意按键退出")