A command-line interface tool for searching audiobookbay and retrieving magnet links. This tool allows you to search for audiobooks using exact phrase matching and easily obtain magnet links for downloading.
- Exact Phrase Search: Search terms are automatically wrapped in quotes for precise matching
- Detailed Information Display: Shows comprehensive information for each audiobook including:
- Title
- Language
- Category
- Format
- File size
- Author
- Narrator
- Bitrate
- Magnet Link Generation: Automatically generates magnet links with optimal trackers
- User-Friendly Interface: Simple command-line interface with numbered results
- Error Handling: Robust error handling for network issues and invalid responses
Before you begin, ensure you have:
- Node.js (version 16 or higher)
- npm (Node Package Manager)
- Git (for cloning the repository)
- Clone the repository:
git clone https://github.com/JaegerMaster/audiobookbay-search
cd audiobookbay-search
- Install dependencies:
npm install
- Start the application:
npm start
# or
node index.js
- When prompted, enter your search term:
Enter search term: Harry Potter
- The tool will display a numbered list of results with details:
1. Harry Potter and the Philosopher's Stone
Language: English
Category: Children
Format: MP3
Size: 264 MB
2. Harry Potter and the Chamber of Secrets
...
- Enter the number of your chosen audiobook to get its magnet link:
Enter the number of the audiobook you want (or 0 to exit):
- The tool will display detailed information and the magnet link:
Audiobook Details:
-------------------
Title: Harry Potter and the Philosopher's Stone
Author: J.K. Rowling
Narrator: Stephen Fry
Format: MP3
Bitrate: 128 kbps
Magnet Link:
magnet:?xt=urn:btih:...
audiobookbay-search/
├── index.js # Main application file
├── package.json # Project configuration and dependencies
├── README.md # Documentation
├── LICENSE # MIT License
└── .gitignore # Git ignore configuration
- axios: HTTP client for making requests to the audiobookbay website
- cheerio: HTML parser for extracting information from web pages
- readline: Built-in Node.js module for command-line interface
The tool performs searches by:
- Converting search terms to lowercase
- Wrapping terms in quotes for exact matching
- Using the format:
https://audiobookbay.lu/?s="search term"&cat=undefined%2Cundefined
- Parsing the HTML response using cheerio
- Extracting relevant information using CSS selectors and regex
Magnet links are generated with:
- Hash extracted from the audiobook page
- Encoded title as the display name
- Multiple trackers for optimal downloading
The tool includes error handling for:
- Network connection issues
- Invalid search results
- Missing magnet links
- Malformed webpage responses
Feel free to submit issues and enhancement requests!
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
This tool is for educational purposes only. Please respect copyright laws and use it responsibly.