fbscraper/utils.py
def PKLtoJSON(old,
              new):
    """routine to convert the pickled dataset (as used in scraper) to JSON
    ---------------------------------------------------------------------
    Input:
    :param old: path to PKL dataset
    :param new: path to JSON dataset
    """
    posts = list()
    with open(old, "rb") as reader:
        try:
            while True:
                posts.append(pkl.load(reader))
        except EOFError:
            pass
    with open(new, "w", encoding="utf-8") as writer:
        writer.write(json.dumps(posts, indent=4))
routine to convert the pickled dataset (as used in scraper) to JSON
    ---------------------------------------------------------------------
    Input:
    :param old: path to PKL dataset
    :param new: path to JSON dataset
    
routine to convert the pickled dataset (as used in scraper) to JSON
Input.
routine to convert the pickled dataset ( as used in scraper ) to JSON Input .
def PKLtoJSON(old,
              new):
    posts = list()
    with open(old, "rb") as reader:
        try:
            while True:
                posts.append(pkl.load(reader))
        except EOFError:
            pass
    with open(new, "w", encoding="utf-8") as writer:
        writer.write(json.dumps(posts, indent=4))
def PKLtoJSON ( old , new ) : posts = list ( ) with open ( old , "rb" ) as reader : try : while True : posts . append ( pkl . load ( reader ) ) except EOFError : pass with open ( new , "w" , encoding = "utf-8" ) as writer : writer . write ( json . dumps ( posts , indent = 4 ) )
routine to convert the pickled dataset (as used in scraper) to JSON
Input:
routine to convert the pickled dataset ( as used in scraper ) to JSON Input :
"""routine to convert the pickled dataset (as used in scraper) to JSON
    ---------------------------------------------------------------------
    Input:
    :param old: path to PKL dataset
    :param new: path to JSON dataset
    """
old
path to PKL dataset
path to PKL dataset
new
path to JSON dataset
path to JSON dataset