Esempio n. 1
0
def get_post(page_id,access_token,limit, parameters=None):
    data = get_data_json(page_id,access_token,limit, parameters=parameters)
    try:
        posts = data["data"]
    except Exception as e:
        loggingmix.ERROR("Error While Fetching Data : get_post : " + str(data))
    else:
        return posts
Esempio n. 2
0
def next_page(page_id,access_token,limit, parameters=None):
    data = get_data_json(page_id,access_token,limit, parameters=parameters)
    parameters = {}
    try :
        next = data["paging"]["next"]
        parms = next.split("?")
        parms = parms[1].split("&")
        for param in parms:
            para = param.split("=")
            parameters[para[0]]=para[1]
    except:
        loggingmix.ERROR(str(data))
    return parameters
Esempio n. 3
0
def check_fetch():
    from src.helper.fetch import get_data_json
    get_data_json(access_token="1425161467767256|NhF9K2ZLgNmKyhLx9q3TjM8-pvk", page_id="funnymiku.in", limit=1)