facebook-scraper icon indicating copy to clipboard operation
facebook-scraper copied to clipboard

get_posts_by_url unexpected keyword argument

Open Rayan-Habbab opened this issue 2 years ago • 1 comments

Hi! I get an unexpected keyword argument when I try to get posts by URL. I've attached my code below and the output. Any thoughts would be much appreciated - also, this is my first time reporting an issue, so if I can provide any additional information / do anything better when reporting, please let me know!

from facebook_scraper import get_posts

for post in get_posts(post_urls=["https://www.facebook.com/Nintendo/"], pages=1): print(post['text'][:50])

the error:

Library/Python/3.8/lib/python/site-packages/facebook_scraper/init.py", line 232, in get_posts return _scraper.get_posts_by_url(post_urls, **kwargs) TypeError: get_posts_by_url() got an unexpected keyword argument 'page_limit'

Rayan-Habbab avatar Aug 29 '22 03:08 Rayan-Habbab

If you're passing post_urls, you can't pass pages, because it doesn't make sense. Try remove the pages argument

neon-ninja avatar Aug 31 '22 01:08 neon-ninja