How to get facebook marketplace location id or keywords list for scraping ? maybe there are another solution?

Viewed 32

I am making a small application, I have some experience with scraping, I have no problem with scraping data from facebook marketplace, I just want to make dynamic location for my app

I have downloaded the data of natural earth vector but I just don't know how to use it and I am looking for another solution?

        const context = await browser.createIncognitoBrowserContext();
        const page = await context.newPage();

        // go to webpage
        await page.goto('https://www.facebook.com', {waitUntil: 'networkidle2'});
        await page.setDefaultNavigationTimeout(0);
        // fill login details and submit
        await page.waitForSelector("#email");
        await page.focus("#email");
        await page.type("#email", "*********", {delay: 150});
        await page.waitForSelector("#pass");
        await page.focus("#pass");
        await page.type("#pass", "**********", {delay: 150});
        await page.click(`[type="submit"]`);
        await page.waitForNavigation();
        await page.waitForTimeout(5000);
        await page.goto("https://www.facebook.com/marketplace/category/vehicles");
        await page.setDefaultNavigationTimeout(0);
        await page.waitForNavigation();
        await page.waitForTimeout(5000);
        // i wanna add location
        return page;
0 Answers
Related