A Flipkart scraper for extracting product information
Project description
Flipkart Scraper
Flipkart Scraper is a Python library designed for extracting detailed product information from Flipkart. This library utilizes web scraping techniques to gather data such as title, price, rating, number of reviews, and description from a given Flipkart product URL.
Installation
1. Prerequisites
Before installing Flipkart Scraper, make sure you have the following prerequisites installed on your system:
- Python (version 3.6 and above)
- pip (Python package installer)
2. Install Flipkart Scraper
Use pip to install Flipkart Scraper:
pip install flipkart-scraper
3. Verify Installation
You can verify the installation by running the following command
flipkart-scraper --version
Usage/Examples
To use Flipkart Scraper, follow these simple steps:
from thevk.flipkartscraper import FlipkartScraper
# Replace the URL with the Flipkart product you want to scrape
url = "https://www.flipkart.com/some-product"
# Initialize the FlipkartScraper with the provided URL
scraper = FlipkartScraper(url)
In-Built Methods:
1. get_title()
This method returns the title of the product.
title = scraper.get_title()
print("Title:", title)
2. get_price()
This method returns the price of the product
price = scraper.get_price()
print("Price:", price)
3. get_rating()
This method returns the rating of the product.
rating = scraper.get_rating()
print("Rating:", rating)
4. get_num_reviews()
This method returns the number of reviews for the product.
num_reviews = scraper.get_num_reviews()
print("Number of Reviews:", num_reviews)
5. get_description()
This method returns the description of the product.
description = scraper.get_description()
print("Description:", description)
Acknowledgements
- Requests - HTTP library for Python
- Beautiful Soup - HTML parsing library for Python
About the Author
Hi there! 👋 I'm Durga Venu Kumar Mutyala, the author of Flipkart Scraper. I'm passionate about AI, Automation and many more.
Contact
- Email: thevk22@gmail.com
- LinkedIn: Durga Venu Kumar Mutyala
- Twitter: @thevk22
Feel free to reach out if you have any questions, suggestions, or just want to connect. I'd love to hear from you!
Happy coding! 🚀
Contributing to Flipkart Scraper
Contributions are always welcome!
Thank you for considering contributing to Flipkart Scraper! Your contributions help make this project better.
Code of Conduct
This project and everyone participating in it are governed by the Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to [your email or a moderation contact].
How to Contribute
1. Fork the repository to your GitHub account.
2. Clone the forked repository to your local machine.
git clone https://github.com/yourusername/flipkart-scraper.git
cd flipkart-scraper
3. Create a new branch for your feature or bug fix.
git checkout -b feature/your-feature
Make your changes and ensure they are working as expected.
4. Commit your changes.
git commit -m "Add your feature or fix"
5. Push the changes to your GitHub repository.
git push origin feature/your-feature
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
Hashes for flipkart_scraper-0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cb8a6f69c8c104a39eae12cd5fea61af7b3e402411822818885af2b13f15ca0e |
|
MD5 | ff979dcc2b74d17315585c033d842194 |
|
BLAKE2b-256 | 631537262d1db4b747296466dedf9227fe8bbf8356628e261e91c635ec49ebf1 |