# -*- coding: utf-8 -*-
"""
Created on Mon Nov  6 09:54:09 2017

@author: hanye
"""
import re

def calculate_v_qq_video_id(data_dic):
    url = data_dic.get("url")
    find_vid = re.findall('/[0-9a-zA-Z]+.html', url)
    if find_vid != []:
        vid = find_vid[0].split('/')[1].split('.')[0]
    else:
        vid = url
    return vid
