A Python package to scrape Flipkart product details
Project description
Flipkart Scraper
A Python package to scrape product details such as price, title, rating, and other information from Flipkart.com. This package offers both an all-in-one method for retrieving all product details at once and separate methods for retrieving specific product details.
Features
- Get product title
- Get product price
- Get product rating
- Get all product details at once
Installation
You can install the abhi-flipkart package using pip:
pip install abhi-flipkart
Requirements Make sure you have the following packages installed:
requests beautifulsoup4 These will be automatically installed with the package.
Usage
from flipkart import FlipkartScraper
# Provide the product URL
product_url = 'https://www.flipkart.com/samsung-galaxy-s23-fe-purple-256-gb/p/itm8f6a49271bf21?pid=MOBGVTA2VGHCJFGG&lid=LSTMOBGVTA2VGHCJFGG1TC2LI&marketplace=FLIPKART&store=tyy%2F4io&srno=b_1_1&otracker=CLP_BannerX3&fm=organic&iid=en_Xqy_OHyrcQALLToVeCOiYi6XfZ1TBn8U_wcElBhYNuR7OzG-guKfCEmcxu3dm4paf1YFLsimTplvCE6DlbZbrvUFjCTyOHoHZs-Z5_PS_w0%3D&ppt=clp&ppn=mobile-phones-store&ssid=stxkg1hx740000001729468470030'
# Create a scraper instance
scraper = FlipkartScraper(product_url)
# Get individual details
title = scraper.get_title()
price = scraper.get_price()
rating = scraper.get_rating()
# Get all details at once
details = scraper.get_all_details()
print(f"Title: {title}")
print(f"Price: {price}")
print(f"Rating: {rating}")
print(f"Details: {details}")
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file abhi_flipkart-1.0.2.tar.gz.
File metadata
- Download URL: abhi_flipkart-1.0.2.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a54949fb2ad7d4c657d9fa57de9e3f57f61ec84d96796feab3e9718195b7b013
|
|
| MD5 |
2aa7cb7acab669f8fb2abe4ecea63041
|
|
| BLAKE2b-256 |
3d1ef64c3ab34b2d54b692df25bbff529f393dbee21ebb43c76a481c5395813d
|
File details
Details for the file abhi_flipkart-1.0.2-py3-none-any.whl.
File metadata
- Download URL: abhi_flipkart-1.0.2-py3-none-any.whl
- Upload date:
- Size: 3.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2756c2af02ef937f49f3911bffa168176ee7becd9152003b07bb87471e33bcc3
|
|
| MD5 |
4655d8883761725f639364b1a958eb63
|
|
| BLAKE2b-256 |
21586ab12adba5c21b283c812ad995b1b4e43fecd5ff7165788999e731687b2a
|