예제 #1
0
def loop(god_name=None, wait=None):
    '''
    create by bigzhu at 16/05/30 13:26:38 取出所有的gods,同步
    '''
    gods = social_sync.getSocialGods('twitter', god_name)
    for god in gods:
        main(god, wait)
예제 #2
0
def loop(god_name=None):
    '''
    create by bigzhu at 16/05/30 13:26:38 取出所有的gods,同步
    '''
    gods = social_sync.getSocialGods('facebook', god_name)
    for god in gods:

        main(god)
예제 #3
0
def getAllMedia(god_name):
    god = social_sync.getSocialGods('instagram', god_name)[0]
    god_name = god.name
    god_id = god.id
    ins_name = god.instagram['name']
    ins_id = god.instagram['id']
    url = 'https://www.instagram.com/graphql/query/?query_id=17888483320059182&variables={"id":"%s","first":1000}' % ins_id
    r = requests.get(url)
    if r.status_code == 200:
        nodes = r.json(
        )['data']['user']['edge_owner_to_timeline_media']['edges']
        for node in nodes:
            node = node['node']
            saveGraphqlMessage(ins_name, god_name, god_id, node)
    else:
        print r.status_code
예제 #4
0
def loop(god_name=None, wait=None):
    '''
    '''
    gods = social_sync.getSocialGods('tumblr', god_name)
    for god in gods:
        main(god, wait)
예제 #5
0
def loop(god_name=None):
    gods = social_sync.getSocialGods('instagram', god_name)
    for god in gods:
        sync(god)