fbscraper/utils.py
def parseLinks(links):
    """routine to extract unique post URLs"""
    postURLsDict = dict()
    for link in tqdm(links, desc="Parsing links"):
        params = urllib.parse.parse_qs(link[11:]) # removing /story.php?
        postURLsDict[(params["story_fbid"][0], params["id"][0])] = True
    postURLs = list()
    for key in tqdm(postURLsDict.keys(), desc="Preparing links"):
        postURLs.append(f"{MBASIC_URL}/story.php?story_fbid={key[0]}&id={key[1]}")
    return postURLs
routine to extract unique post URLs
routine to extract unique post URLs
routine to extract unique post URLs
def parseLinks(links):
    postURLsDict = dict()
    for link in tqdm(links, desc="Parsing links"):
        params = urllib.parse.parse_qs(link[11:]) 
        postURLsDict[(params["story_fbid"][0], params["id"][0])] = True
    postURLs = list()
    for key in tqdm(postURLsDict.keys(), desc="Preparing links"):
        postURLs.append(f"{MBASIC_URL}/story.php?story_fbid={key[0]}&id={key[1]}")
    return postURLs
def parseLinks ( links ) : postURLsDict = dict ( ) for link in tqdm ( links , desc = "Parsing links" ) : params = urllib . parse . parse_qs ( link [ 11 : ] ) postURLsDict [ ( params [ "story_fbid" ] [ 0 ] , params [ "id" ] [ 0 ] ) ] = True postURLs = list ( ) for key in tqdm ( postURLsDict . keys ( ) , desc = "Preparing links" ) : postURLs . append ( f"{MBASIC_URL}/story.php?story_fbid={key[0]}&id={key[1]}" ) return postURLs
routine to extract unique post URLs
routine to extract unique post URLs
"""routine to extract unique post URLs""" # removing /story.php?
links