Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I scrape facebook group post #5

Open
mycooll opened this issue Jan 20, 2025 · 2 comments
Open

How can I scrape facebook group post #5

mycooll opened this issue Jan 20, 2025 · 2 comments

Comments

@mycooll
Copy link

mycooll commented Jan 20, 2025

Hi
I want to scrape facebook group,how can I change the code? Thank you .
Looking forward to your reply.

@FaustRen
Copy link
Owner

@mycooll
Normally, you may need to log in to your account to collect data,
and the account must be a member of the community.

But I just discovered that there is a bug in the current method of logging in with an account.
I'll fix it as soon as possible.
Thank you!

@mycooll
Copy link
Author

mycooll commented Jan 21, 2025

So if I whant to scrape group, I just modify facebook_user_name = "love.yuweishao" and facebook_user_id = "100044253168423" right?
Can you give me an example?Or you have best solution, please let me know, thank you.

>> Example.1 - without logging in

if __name__ == "__main__":
    facebook_user_name = "love.yuweishao"
    facebook_user_id = "100044253168423"
    days_limit = 30 # Number of days within which to scrape posts
    driver_path = "/Users/renren/Desktop/FB_graphql_scraper拷貝/fb_graphql_scraper/resources/chromedriver-mac-arm64/chromedriver" 
    fb_spider = fb_graphql_scraper(driver_path=driver_path)
    res = fb_spider.get_user_posts(fb_username_or_userid=facebook_user_name, days_limit=days_limit,display_progress=True)
    print(res)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants