moda20 / facebook-scraper

Scrape Facebook public pages without an API key

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issues getting group listings: getting some listings, not all. URL parameters don't seem to work.

aoiotoko opened this issue · comments

Hi. I'm trying to fetch the latest item listings from a FB group in chronological order but for some reason I seem to get random listings. They do appear in chronological order, but they're definitely not all of them. It's like I'm getting one or two from each of the past few days, but not even the ones from the current day, it seems really random.

I've tried to fix the issue by adding ?sorting_setting=CHRONOLOGICAL_LISTINGS and ?v=timeline to the start_url inside get_posts() to no avail (those parameters seem to make no difference).

Does anyone have any suggestions?

Thanks!

Here's the code that does the fetching:

for post in get_posts(group="utahboardgamexchange", base_url="https://mbasic.facebook.com", start_url="https://mbasic.facebook.com/groups/utahboardgamexchange/?sorting_setting=CHRONOLOGICAL_LISTINGS", pages=5, options={
        "posts_per_page": 200
    }):
    print(post['text'])

Has anyone had any luck figuring this out? Running into the same issue with ?sorting_setting=CHRONOLOGICAL working on the desktop facebook site but the mobile/mbasic site doesn't respect it..