def find_cid_api(vid, p, cookies):
    global cid, partname, title, videourl, pages
    cid = 0
    title , partname , pages, = '', '', ''
    if str(p) is '0' or str(p) is '1':
        #str2Hash = 'appkey={APPKEY}&id={vid}&type=xml{SECRETKEY}'.format(APPKEY = APPKEY, vid = vid, SECRETKEY = SECRETKEY)
        #biliurl = 'https://api.bilibili.com/view?appkey={APPKEY}&id={vid}&type=xml&sign={sign}'.format(APPKEY = APPKEY, vid = vid, SECRETKEY = SECRETKEY, sign = calc_sign(str2Hash))
        biliurl = 'https://api.bilibili.com/view?appkey={APPKEY}&id={vid}&type=xml'.format(APPKEY = APPKEY, vid = vid, SECRETKEY = SECRETKEY)

    else:
        #str2Hash = 'appkey={APPKEY}&id={vid}&page={p}&type=xml{SECRETKEY}'.format(APPKEY = APPKEY, vid = vid, p = p, SECRETKEY = SECRETKEY)
        #biliurl = 'https://api.bilibili.com/view?appkey={APPKEY}&id={vid}&page={p}&type=xml&sign={sign}'.format(APPKEY = APPKEY, vid = vid, SECRETKEY = SECRETKEY, p = p, sign = calc_sign(str2Hash))
        biliurl = 'https://api.bilibili.com/view?appkey={APPKEY}&id={vid}&page={p}&type=xml'.format(APPKEY = APPKEY, vid = vid, SECRETKEY = SECRETKEY, p = p)
    logging.debug('BiliURL: ' + biliurl)
    videourl = 'http://www.bilibili.com/video/av{vid}/index_{p}.html'.format(vid = vid, p = p)
    logging.info('Fetching api to read video info...')
    data = ''
    try:
        #request = urllib2.Request(biliurl, headers=BILIGRAB_HEADER)
        #response = urllib2.urlopen(request)
        #data = response.read()
        data = send_request(biliurl, BILIGRAB_HEADER, IS_FAKE_IP)
        logging.debug('Bilibili API: ' + data)
        dom = parseString(data)
        for node in dom.getElementsByTagName('cid'):
            if node.parentNode.tagName == "info":
                cid = node.toxml()[5:-6]
                logging.info('cid is ' + cid)
                break
        for node in dom.getElementsByTagName('partname'):
            if node.parentNode.tagName == "info":
                partname = clean_name(str(node.toxml()[10:-11]))
                logging.info('partname is ' + partname)# no more /\ drama
                break
        for node in dom.getElementsByTagName('title'):
            if node.parentNode.tagName == "info":
                title = clean_name(str(node.toxml()[7:-8])).decode("utf-8")
                logging.info((u'Title is ' + title).encode(sys.stdout.encoding))
        for node in dom.getElementsByTagName('pages'):
            if node.parentNode.tagName == "info":
                pages = clean_name(str(node.toxml()[7:-8]))
                logging.info('Total pages is ' + str(pages))
        return [cid, partname, title, pages]
    except Exception:  # If API failed
        logging.warning('Cannot connect to API server! \nIf you think this is wrong, please open an issue at \nhttps://github.com/cnbeining/Biligrab/issues with *ALL* the screen output, \nas well as your IP address and basic system info.\nYou can get these data via "-l".')
        logging.debug('API Data: ' + data)
        return ['', '', '', '']

#----------------------------------------------------------------------
return the dtype object of the underlying data
dataset/ETHPy150Open cnbeining/Biligrab/biligrab.py/find_cid_api--crossover with--dataset/ETHPy150Open pydata/pandas/pandas/core/series.py/Series.dtypes