Skip to content

This repository provides an updated function to check up ASIN codes on amazon

Notifications You must be signed in to change notification settings

federiconuta/asin_python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

ASIN codes scraping

This repository provides an updated function to scrape and collect up ASIN codes of Amazon together with the product names related to the provided keyword.

Usage

Download the file asin_check2.py. If you work on Jupyter put it in the repository where you have your main .ipynb file. Then type:

from asin_check2 import asin_lookup2

The usage is simple. Just type asin_lookup2("product_name").

Example usage:

asin_lookup2("airpods"):

Screenshot 2024-01-16 at 3 23 26 PM

Clean the dataset whereby necessary.

Class version

The file called amazonscraperclass.py provides a more compact way to perform the task. Specifically it defines a class AmazonASINScraper with an attribute called get_first_three_asins which returns the name of the product and the first 3 non missing ASIN for the product search input.

Usage

scraper = AmazonASINScraper()
df = pd.DataFrame({'Name': ['Airpods', 'Echo', 'Kindle']})  # Example DataFrame

df['ASINs'] = df['Name'].apply(scraper.get_first_three_asins)
print(df)

About

This repository provides an updated function to check up ASIN codes on amazon

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages