Portfolio
Amazon Product scraping
May 2024 - Jun 2024
Stack
NodeJs
Playwright
Project Overview
This project involves scraping Amazon products using Playwright and storing the data in Google Sheets and sending Specific products to CDON API.
Flow
- Read URL and country from Google Sheet.
- Scrape product details from Amazon based on URL and country.
- Save images to Shopify via GraphQL API.
- Save product details to Google Sheet.
- Repeat the process for all products in the Google Sheet.
- If the column Platform has CDON value, send the product to CDON API.
Challenges
- Handling Captcha
- Used proxy rotation, but it was expensive.
- Implemented Google Gemini API to solve image captchas.
- If captcha is detected:
- Download the image.
- Send it to Gemini API.
- Receive the text solution from the API.
- Enter the solution in the captcha field.
- If the captcha solution fails, repeat the process.
Lessons Learned
- Learned about GraphQL API.
- Learned about Google Gemini API.
Contribution from Usman
Usman made a significant contribution to the project by:
- Image Quality Improvement: Helping in obtaining high-quality images from the Amazon product page.
This contribution was crucial in enhancing the project’s overall quality and accuracy.