def select_url_from_video_api(html):
    """str(html)->str(url)
    
    Choose the best one.
    
    Used in both single and drama download.
    
    code definition:
    {'tv': 'liuchang',
    'dvd': 'biaoqing',
    'hd': 'gaoqing',
    'sdvd': 'chaoqing'}"""
    c = json.loads(html)
    #{'retmsg': 'ok', 'retcode': '200', 'selected': 'tv', 'mp4': [{'filename': '', 'http': 'http://jobsfe.funshion.com/query/v1/mp4/7FCD71C58EBD4336DF99787A63045A8F3016EC51.json', 'filesize': '96748671', 'code': 'tv', 'name': '流畅', 'infohash': '7FCD71C58EBD4336DF99787A63045A8F3016EC51'}...], 'episode': '626464'}
    video_dic = {}
    for i in c['mp4']:
        video_dic[i['code']] = i['http']
    quality_preference_list = ['sdvd', 'hd', 'dvd', 'sd']
    url = [video_dic[quality] for quality in quality_preference_list if quality in video_dic][0]
    html = get_html(url)
    c = json.loads(html)
    #'{"return":"succ","client":{"ip":"107.191.**.**","sp":"0","loc":"0"},"playlist":[{"bits":"1638400","tname":"dvd","size":"555811243","urls":["http:\\/\\/61.155.217.4:80\\/play\\/1E070CE31DAA1373B667FD23AA5397C192CA6F7F.mp4",...]}]}'
    return [i['urls'][0] for i in c['playlist']]
dataset/ETHPy150Open soimort/you-get/src/you_get/extractors/funshion.py/select_url_from_video_api/original