This is a Python script for scraping anime data from the website MyAnimeList. It uses Selenium webdriver to navigate the website and extract anime information such as the titles, characters, streaming services, and more. The scraped data is then stored in JSON files.
To use this script, you will need to have the following installed:
- Python 3
- Selenium
- Mozilla Firefox browser
- Clone the repository to your local machine.
- Install the required dependencies with
pip install webdriver-managerandpip install selenium. - Run the script with
python scrape_myanimelist.py.
- Clone this repository to your local machine.
- Open the terminal and navigate to the repository.
- Run the command
python3 scrape_myanimelist.pyto start the script.
The script loops through each letter of the alphabet and scrapes all the anime data for that letter. It then saves the data in a JSON file named after the corresponding letter. For example, anime titles starting with the letter "A" will be saved in a file called "A.json".
The script navigates to each page of anime titles for each letter using Selenium webdriver. It also uses the expected_conditions module to handle waiting for elements to load before scraping data.
The script extracts various data points for each anime such as the English and Japanese titles, characters, streaming services, and more. If data is not available, it is marked as "N/A" in the JSON file.
This Python script provides a way to easily scrape anime data from the website MyAnimeList. The data can be used for analysis, recommendations, or any other purpose. Feel free to modify the script to suit your needs.
Note: Do not abuse the site with excessive requests or use this code for unethical purposes. This code is intended for educational purposes only.