A
A
Alexander2021-01-08 23:26:59
PHP
Alexander, 2021-01-08 23:26:59

How to scrape ads from Facebook Marketplace?

I want to parse data from the Facebook marketplace. It would save me a lot of time, but no matter how much I fight, I can’t parse the page in any way :(
But, the Graph API does not yet support the marketplace, and when I try to parse the page using simple means, Facebook apparently sees that this is not a browser and returns an offer to download the browser Maybe someone came across this and found a solution?

My parsing that works everywhere except facebook

$url = "https://www.facebook.com/marketplace/category/electronics/";
$html[0] = file_get_contents($url);

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Shamanov, 2021-01-08
@Ic2d

your application must first "log in", google similar scripts using curl

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question