Esempio n. 1
0
def main():
    api_key = config.WeiboApp.APP_KEY
    api_secret = config.WeiboApp.APP_SECRET
    callback_url = config.WeiboApp.CALLBACK_URL
    username = config.WeiboApp.USERNAME
    password = config.WeiboApp.PASSWORD
    uid = config.WeiboApp.UID

    weibo_app = WeiboApp(api_key, api_secret, callback_url, username,
                         password, uid)

    if is_day():
        types = {'qiubai_duanzi': 3, 'qiubai_hot': 1, 'qiubai_img': 3,
                 'gif_file': 10, 'tumblr_gifak': 10, 'tumblr_forgifs': 10,
                 'tumblr_catsdogsblog': 10, 'tumblr_gifsboom': 10,
                 'tumblr_gifson': 10, 'tumblr_aewae': 10,
                 'tumblr_althingscute': 10, 'tumblr_elmontajista': 10,
                 'tumblr_icachondeo': 10, 'tumblr_tychoon': 20}
    else:
        types = {'tumblr_chinabeauties': 10, 'tumblr_bestofasiangirls': 10,
                 'tumblr_sossex1': 10, 'tumblr_sossex1': 10,
                 'tumblr_lobbu': 10, 'tumblr_happylim': 10,
                 'tumblr_girl2chick': 10, 'tumblr_lovelyasians': 10,
                 'girls': 100}

    type_list = generate_type_list(types)
    cur_type = random.choice(type_list)

    weibo_type = WeiboTypes(weibo_app)
    weibo_type.choose(cur_type)
Esempio n. 2
0
def main():
    api_key = config.WeiboApp.APP_KEY
    api_secret = config.WeiboApp.APP_SECRET
    callback_url = config.WeiboApp.CALLBACK_URL
    username = config.WeiboApp.USERNAME
    password = config.WeiboApp.PASSWORD
    uid = config.WeiboApp.UID

    weibo_app = WeiboApp(api_key, api_secret, callback_url, username, password,
                         uid)

    if is_day():
        types = {
            'qiubai_duanzi': 3,
            'qiubai_hot': 1,
            'qiubai_img': 3,
            'gif_file': 10,
            'tumblr_gifak': 10,
            'tumblr_forgifs': 10,
            'tumblr_catsdogsblog': 10,
            'tumblr_gifsboom': 10,
            'tumblr_gifson': 10,
            'tumblr_aewae': 10,
            'tumblr_althingscute': 10,
            'tumblr_elmontajista': 10,
            'tumblr_icachondeo': 10,
            'tumblr_tychoon': 20
        }
    else:
        types = {
            'tumblr_chinabeauties': 10,
            'tumblr_bestofasiangirls': 10,
            'tumblr_sossex1': 10,
            'tumblr_sossex1': 10,
            'tumblr_lobbu': 10,
            'tumblr_happylim': 10,
            'tumblr_girl2chick': 10,
            'tumblr_lovelyasians': 10,
            'girls': 100
        }

    type_list = generate_type_list(types)
    cur_type = random.choice(type_list)

    weibo_type = WeiboTypes(weibo_app)
    weibo_type.choose(cur_type)
Esempio n. 3
0
def test_all_types():
    weibo_app = init_app()
    weibo_type = WeiboTypes(weibo_app)
    for each_type in types:
        weibo_type.choose(each_type)
        time.sleep(10)
Esempio n. 4
0
def test_type(type_name):
    weibo_app = init_app()
    weibo_type = WeiboTypes(weibo_app)
    weibo_type.choose(type_name)
Esempio n. 5
0
def test_all_types():
    weibo_app = init_app()
    weibo_type = WeiboTypes(weibo_app)
    for each_type in types:
        weibo_type.choose(each_type)
        time.sleep(10)
Esempio n. 6
0
def test_type(type_name):
    weibo_app = init_app()
    weibo_type = WeiboTypes(weibo_app)
    weibo_type.choose(type_name)