To open https://github.com/ytdl-org/youtube-dl/tree/master/youtube_dl/extractor ,bilibili.py in it,i get bilibili.py source code,it help nothing.
It is no use for a newbie like me to look over and over at bilibili.py's source code.
It is difficult for me to understand how youtube-dl get video's real url on bilibili?
What is the principle for bilibili.py to extract video's real url on bilibili?
There are 421 lines in bilibili.py's source code,please simplify bilibili.py as a short single function such as getUrlFromBilibili.
url = "https://www.bilibili.com/video/av52135588?from=search&seid=5625791913889140593"
real_url = getUrlFromBilibili(url)
print(real_url)
Please fulfil the getUrlFromBilibili function and give some comments in it to show principle to get video's real url on bilibili.
def getUrlFromBilibili(url):
#make the function short as soon as possible