passivebot / facebook-marketplace-scraper

This repository contains a script to scrape Facebook Marketplace data using Playwright, BeautifulSoup and Streamlit.
https://www.youtube.com/watch?v=vjsQLIyUY-I
222 stars 63 forks source link

Unable to login #8

Closed martin3252 closed 6 months ago

martin3252 commented 7 months ago

Hi there,

Thank you for this great work.

I run the code on EC2 but I always get the same error message "You must log in to continue.Log Into Facebook" on my terminal.

Do you have any ideas on how I can fix the issue?

Thank you for anything you can provide.

nschwan94 commented 7 months ago

I'm interested in the feasibility of this project too. Seems like scraping marketplace is not feasible. Has anybody used the official api before?

ahmadkammonah commented 7 months ago

I've been scrapping market place without logging in and it's been successful. What environment/setup are you using?

Wondering if using it in headless mode is causing the issue.

martin3252 commented 7 months ago

@ahmadkammonah I did wonder if the headless mode was causing the issue, but I set headless to False.

My steps and environment:

  1. Connect to EC2(AWS VM) + conda env
  2. Run the code in EC2
  3. There is an error "Looks like you launched a headed browser without having a XServer running."
  4. I run xvfb-run python3 app.py to solve the issue at step3.
  5. Then it pops out the issue "You must log in to continue.Log Into Facebook".

I think maybe xvfb-run is causing the issue. What do you think? Is there any hard code I need to modify before I run it?

martin3252 commented 6 months ago

I believe the problem comes from xserver. There is no issue with Xserver.