question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

comments_full is None or Empty

See original GitHub issue

Input:

import json
import logging

from facebook_scraper import get_posts, enable_logging

enable_logging(logging.DEBUG)
logging.basicConfig(filename="logs.txt", filemode='w', level=logging.DEBUG)

posts: list = []

for post in get_posts(group='1653646018033823', pages=1, cookies="cookies.json", timeout=30,
                      extra_info=True,
                      options={"comments": True,
                               "reactors": True, }):
    posts.append(post)
    json.dump(posts, open('posts.txt', 'w', encoding='utf-8'),
              indent=4, ensure_ascii=False, default=str, sort_keys=True)

    if len(posts) == 3:
        break

Output Files:

logs.txt posts.txt


facebook-scraper-0.2.43

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:6

github_iconTop GitHub Comments

2reactions
neon-ninjacommented, Jul 3, 2021

Try latest master

1reaction
neon-ninjacommented, Jul 6, 2021

https://github.com/kevinzg/facebook-scraper/commit/a6af0366ba8b5430efa9be3275791ebea2df19e2 should fix this problem for these kind of URLs for video posts

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to check if the string is empty? - python - Stack Overflow
This is what I would use to test if a string is either None OR Empty OR Blank: def isBlank (myString): if myString...
Read more >
How To Bash Shell Find Out If a Variable Is Empty Or Not
If the length of STRING is zero, variable ($var) is empty. The test command is used to check file types and compare values....
Read more >
Check for non-empty string in the shell (instead of ! -z)
The -p test is something completely different ("true if the given file exists and is a named pipe").
Read more >
JavaScript Check Empty String – Checking Null or Empty in JS
In this article, you will learn how to check if a sting is empty or null in JavaScript. We will see many examples...
Read more >
Powershell command - null or empty comand is not working
In the situation you present, $RequestorEmail contains an empty string. In your 1st test, since the variable $RequestorEmail is NOT $null ( ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found