Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feat] How to use Firecrawl (python) to login a website like Amazon and then scrape & parse its product reviews? #1093

Open
david-MYS opened this issue Jan 27, 2025 · 0 comments

Comments

@david-MYS
Copy link

david-MYS commented Jan 27, 2025

Hi,

Do you have a tutorial on how to use Firecrawl to log in to a website like Amazon and then scrape/parse its product reviews? I came across your cURL tutorial here: Complete Guide to cURL Authentication with Firecrawl API. However, I couldn’t find any tutorials for Python.

I know it is possible to use Selenium to login Amazon website. But I also saw there is a function 'actions' from Firecrawl documentation that can log in a website ( from: https://docs.firecrawl.dev/introduction ).

from firecrawl import FirecrawlApp

app = FirecrawlApp(api_key="fc-YOUR_API_KEY")

# Scrape a website:
scrape_result = app.scrape_url('firecrawl.dev', 
    params={
        'formats': ['markdown', 'html'], 
        'actions': [
            {"type": "wait", "milliseconds": 2000},
            {"type": "click", "selector": "textarea[title=\"Search\"]"},
            {"type": "wait", "milliseconds": 2000},
            {"type": "write", "text": "firecrawl"},
            {"type": "wait", "milliseconds": 2000},
            {"type": "press", "key": "ENTER"},
            {"type": "wait", "milliseconds": 3000},
            {"type": "click", "selector": "h3"},
            {"type": "wait", "milliseconds": 3000},
            {"type": "scrape"},
            {"type": "screenshot"}
        ]
    }
)
print(scrape_result)

Could you please point me to the right resources or provide guidance on how to achieve this using Python?

Thank you!

@david-MYS david-MYS changed the title [Feat] How to use Firecrawl (python) to login Amazon website and then scrape & parse product reviews? [Feat] How to use Firecrawl (python) to login a website like Amazon and then scrape & parse its product reviews? Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant