kevinzg / facebook-scraper

Scrape Facebook public pages without an API key
MIT License
2.44k stars 632 forks source link

scrape multiple facebook pages #80

Open Rahulsunny11 opened 4 years ago

Rahulsunny11 commented 4 years ago

Hi, can we scrape multiple Facebook pages? if we can, tell me how to run the command thank you

kevinzg commented 4 years ago

Currently the library doesn't offer a way to scrape multiple pages at the same time. I want to add asyncio support, but I haven't get to that yet. I think your best options are running the command in multiple processes, or creating a python script that runs the get_posts function in multiple threads (not sure if using the same requests_html session is thread safe though, it may be safer to create a different FacebookScraper instance with their own HTML session for each thread).

GivenToFlyCoder commented 4 years ago

Not multiple pages at the same time, instead sucuencial pages taken from a list.