This Python script scrapes bookmark data from Archive of Our Own (AO3) for a specified user. It extracts information like work titles, authors, fandoms, pairings, tags, and more.
- Fetches bookmark data from a given AO3 user's page 📖.
- Extracts key metadata for each bookmarked work 🔍.
- Handles AO3's terms of service agreement popup ✅.
- Provides a clean, structured output of bookmark data 📊.
- Python 3.6+
seleniumlibrary- A compatible web browser (Chrome, Firefox , etc.) and its corresponding WebDriver.
-
Clone the repository:
git clone [repository URL] cd [repository directory] -
Install the required Python packages:
pip install selenium
-
Download the appropriate WebDriver for your browser and add it to your PATH or specify its location in the script.
- Chrome: ChromeDriver download
- Firefox: GeckoDriver download
-
Run the script:
python get.py [AO3 username]
Replace
[AO3 username]with the username of the AO3 user whose bookmarks you want to scrape. -
Add
--visibleto the script if you prefer the WebDriver to not launch headless. -
The script will output the scraped bookmark data to the console 🖥️.
python get.py myAO3usernameTo run the unit tests:
pytest tests/test_scraper.py📦 AO3-Bookmark-Scraper
├── 📜 get.py # Main script for scraping AO3 bookmarks
├── 📂 tests
│ ├── ✅ test_scraper.py # Unit tests for the scraping functionality
├── 📖 README.md # Project documentation- Educational Purposes Only: This script is provided for educational purposes, demonstrating web scraping techniques.
- Respect for Creative Rights: The author of this script does not support the use of web scraping for AI training purposes. It is crucial to respect the creative rights of authors and adhere to the terms of service of websites.
- Be mindful of AO3's terms of service and robots.txt.
- The script may need to be updated if AO3's website structure changes.
Contributions are welcome! Please feel free to submit a pull request.