This is a sample project to demonstrate how to use Scrapy to scrape data from a website. The bot scrapes the prices of Apple iPhones from Apple's official websites in different countries. The scraped data is then saved to a CSV file (by default) or any other format that is supported by Scrapy.
Please note, this is a demonstration project and should not be used for anything other than educational purposes.
- Python 3.6 or later
- Scrapy
- Clone the repository.
- Install Python 3.6 or later.
- Install scrapy using pip:
pip install scrapy
To run the bot, navigate to the project directory and run the following command:
cd iphone_price_bot
scrapy crawl apple_website_spider
This will run the bot and save the scraped data to a CSV file named iphone_prices.csv
.
You can also save the scraped data to other formats such as JSON, XML, or even a database. For more information, please refer to the Scrapy documentation.
This project is licensed under the MIT License.