Beispiel #1
0
def getdata():
    uid = getUid()
    domain = getDomian(uid)
    print domain
    data = getTitle(
        domain,
        '/app/member/FT_browse/body_var.php?rtype=re&langx=zh-cn&mtype=4&page_no=0&league_id=&hot_game=&uid=',
        uid,
        time=10)
    return data
Beispiel #2
0
#encoding=utf-8
#!/usr/bin/python
#import threading
#import Queue
#import sys
from login_ini import getUid
getUid(1)
Beispiel #3
0
        req = urllib2.Request(
            globalConfig.dominAll +
            "/app/member/FT_index.php?mtype=4&langx=zh-cn&news_mem=Y&uid=" +
            uid, None, headers)
        response = urllib2.urlopen(req, None, timeout=10)
        #response = urllib2.urlopen(globalConfig.dominAll+"/app/member/FT_index.php?mtype=4&langx=zh-cn&news_mem=Y&uid="+uid,timeout=10)
    html = response.read()
    print html
    url = re.compile(r'action=\'(.*?)\'').findall(html)
    if (url):
        return url[0]
    else:
        return globalConfig.dominAll


uid = getUid()
domain = getDomian()
print domain
i_headers = {
    "User-Agent":
    "Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.1) Gecko/20090624 Firefox/3.5",
    "Referer":
    domain +
    '/app/member/FT_future/index.php?rtype=pd&langx=zh-cn&mtype=4&showtype=future&hot_game=&league_id=&uid='
    + uid
}


def workerbee(inputlist):
    for x in xrange(THREAD_LIMIT):
        print 'Thead {0} started.'.format(x)