Skip to content

Poornima-Jayadevan/Python-Projects

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Books Scraper

📌 Project Overview

This is a Scrapy-based web scraper that extracts book titles, prices, and URLs from Books to Scrape. The extracted data is stored in a JSON file for further analysis.


🛠️ Installation

1️⃣ Install Python (if not installed)

Ensure you have Python 3.6+ installed. Check with:

python --version

If not installed, download it from python.org.

2️⃣ Install Scrapy

pip install scrapy

3️⃣ Clone or Download the Repository

git clone https://github.com/your-username/books_scraper.git
cd books_scraper

View the Output

Open books.json to see the extracted data:

[
    {
        "title": "A Light in the Attic",
        "price": "£51.77",
        "url": "https://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html"
    }
]

🛠️ Troubleshooting

❌ "Spider Not Found" Error

  • Make sure you are inside the Scrapy project directory before running the command.
  • Check that books_spider.py exists in books_scraper/spiders/.

❌ "scrapy command not found"

  • Ensure Scrapy is installed correctly using pip install scrapy.
  • Try running with Python:
    python -m scrapy crawl books -o books.json

🌟 Acknowledgments


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages