moda20 / facebook-scraper

Scrape Facebook public pages without an API key
MIT License
60 stars 23 forks source link

Scrapping without being logged in #48

Closed krasnoludkolo closed 3 months ago

krasnoludkolo commented 3 months ago

Hello, Is this possible to scrap posts from given page without being logged (via cookies)?

I tried basic example

posts = get_posts('NintendoAmerica', base_url="https://mbasic.facebook.com", start_url="https://mbasic.facebook.com/NintendoAmerica?v=timeline", pages=10)

for post in posts:
    print(post['text'][:50])

but I got no results.

lullu57 commented 3 months ago

I do think that the get_posts is not working right now. Awaiting feedback from repo maintainer.

moda20 commented 3 months ago

@krasnoludkolo @lullu57 you can't scrape without being logged in anymore when using this repo. i moved to using the mbasic version exclusively and it needs you to be logged in to view anything.

here is another repo you can try to use to scrape without being logged in : https://github.com/shaikhsajid1111/facebook_page_scraper