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.

suddenly I get always facebook_scraper.exceptions.LoginRequired calling get_page_info

See original GitHub issue

Hi folks, not reporting a bug (at least I don’t think so), just looking for help. I started using facebook-scraper yesterday, and I was able to get results using get_page_info. Today, suddenly, everytime I call that method I get the following exception with every page I try to scrape (even the ones that were working):

  File "C:\ReleWant\git\nj-fb-scraper\venv\lib\site-packages\facebook_scraper\__init__.py", line 98, in get_page_info
    return _scraper.get_page_info(account, **kwargs)
  File "C:\ReleWant\git\nj-fb-scraper\venv\lib\site-packages\facebook_scraper\facebook_scraper.py", line 293, in get_page_info
    resp = self.get(post["post_id"])
  File "C:\ReleWant\git\nj-fb-scraper\venv\lib\site-packages\facebook_scraper\facebook_scraper.py", line 475, in get
    raise exceptions.LoginRequired(
facebook_scraper.exceptions.LoginRequired: A login (cookies) is required to see this page

Is there any reason? Am I doing something wrong?

Using facebook-scraper 0.2.45

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
neon-ninjacommented, Aug 6, 2021

I think they last a year. Yes, multiple accounts might be useful depending on the scale of scraping you’re trying to do

0reactions
sla-tecommented, Aug 7, 2021

Ok, it seems like the method get_posts() in the packages __init__.py works differently than the one in the FaceBookScraper class. If we use the method get_posts() after instantiating an instance of the class, the cookies parameter is being ignored.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

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