kevinzg / facebook-scraper

Scrape Facebook public pages without an API key
MIT License
2.42k stars 630 forks source link

WARNING:facebook_scraper.page_iterators:No raw posts (<article> elements) were found in this page. #1076

Open lemontea87 opened 10 months ago

lemontea87 commented 10 months ago

i use gg colab and connect gg drive FANPAGE_LINK ="VolleyballWorld" FOLDER_PATH = "/content/drive/MyDrive/baikiemtrapython/" COOKIE_PATH = "/content/drive/MyDrive/baikiemtrapython/www.facebook.com_cookies (9).txt"

PAGES_NUMBER = 10 # Number of pages to crawl post_list = [] for post in get_posts(FANPAGE_LINK, options={"comments": True, "reactions": True, "allow_extra_requests": True}, extra_info=True, pages=10, cookies=COOKIE_PATH): post_list.append(post) really need help :((

moda20 commented 10 months ago

@lemontea87 try to use this repo instead : https://github.com/moda20/facebook-scraper

mikhalko commented 10 months ago

the same problem, moda20 did not help

moda20 commented 10 months ago

@mikhalko please post the example you used with my repo, i can't know what "did not help" mean

mikhalko commented 10 months ago

Hi.

Your source in page_iterators.py line 152: page = self._get_page('article[data-ft*="top_level_post_id"]', 'article') if (len(page) == 0): page = self._get_page('article[data-ft]', 'article') return PageClass(page, self.get_page_info())

But now there is no 'article[data-ft' in FB pages (mobile, no login, Public Page) And as result 0 Posts ((((

But if close login form and scroll down , page posts will apear

moda20 commented 10 months ago

@mikhalko this repo and my fork uses mbasic to parse, check the readme on my repo to see how to get it to run correctly

mikhalko commented 10 months ago

@moda20 Thanks for response. There is a problem. It is impossible to open mbasic url without login. Try to open https://mbasic.facebook.com/nintendo?v=timeline

FB ask to login(((

moda20 commented 10 months ago

@mikhalko yeah, i believe mbasic needs logins for everything. if you can't use credentials of cookies then i think you should try this repo, it does most things but without logins needed : https://github.com/shaikhsajid1111/facebook_page_scraper