Esempio n. 1
0
def yahooDown(code):
    code = sat_util.codeAddPrefix(code)
    durl = qurl + qrandomPrefix + str(random.random()) + qcodePrefix + code
    if (debug): print(durl)
    s = sat_down.GetRtPriceByURL(durl)
    if s == '':
        return False, None
    strGB = sat_util.ToGB(s)
    return yahooParseSingle(strGB)
Esempio n. 2
0
def QtDown(code):
    code = sat_util.codeAddPrefix(code)
    durl = qurl + 'r=' + str(random.random()) + '&q=' + code
    #durl=qurl+code
    if (debug): print(durl)
    s = sat_down.GetRtPriceByURL(durl)
    if s == '':
        return False, None
    strGB = sat_util.ToGB(s)
    return QtParseSingle(strGB)
Esempio n. 3
0
def YahooParseMulti(s):
    if (debug): print(type(str))
    ldict = []
    for l in s:
        if (debug): print(l)
        strGB = sat_util.ToGB(l)
        b, d = YahooParseSingle(strGB)
        if b:
            ldict.append(d)
    return ldict
Esempio n. 4
0
def QtParseMulti(s):
    if (debug): print(type(str))
    ldict = []
    if s == None:
        return ldict
    for l in s:
        if (debug): print(l)
        #l = str(l)
        strGB = sat_util.ToGB(l)
        b, d = QtParseSingle(strGB)
        if b:
            ldict.append(d)
    return ldict