Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📚 AO3 Bookmark Scraper 🔖

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.

✨ Features

  • 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 📊.

⚙️ Prerequisites

  • Python 3.6+
  • selenium library
  • A compatible web browser (Chrome, Firefox , etc.) and its corresponding WebDriver.

⬇️ Installation

  1. Clone the repository:

    git clone [repository URL]
    cd [repository directory]
  2. Install the required Python packages:

    pip install selenium
  3. Download the appropriate WebDriver for your browser and add it to your PATH or specify its location in the script.

🚀 Usage

  1. Run the script:

    python get.py [AO3 username]

    Replace [AO3 username] with the username of the AO3 user whose bookmarks you want to scrape.

  2. Add --visible to the script if you prefer the WebDriver to not launch headless.

  3. The script will output the scraped bookmark data to the console 🖥️.

📝 Example

python get.py myAO3username

🧪 Testing

To run the unit tests:

pytest tests/test_scraper.py

📂 Project Structure

📦 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

⚠️ Notes

  • 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.

🤝 Contributing

Contributions are welcome! Please feel free to submit a pull request.

About

This Python program uses Selenium to scrape a user's Bookmarks from the fanfiction hub Archive of Our Own (AO3).

Resources

Stars

3 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages