2025-01-21 00:43:35 +03:00
2025-01-21 00:39:42 +03:00
2025-01-21 00:43:35 +03:00
2025-01-21 00:39:42 +03:00
2025-01-20 23:58:11 +03:00
2025-01-20 23:58:11 +03:00
2025-01-20 23:58:11 +03:00
2025-01-21 00:39:42 +03:00
2025-01-20 23:58:11 +03:00
2025-01-20 23:58:11 +03:00
2025-01-20 23:58:11 +03:00

Unoffical Amazon Book Search

This library allows you to retrieve book information from Amazon using only the ISBN number, without needing an API key. The library analyzes Amazon HTML structure and returns book details in JSON format. It works asynchronously (based on Promises).

At the same time, you can recreate book descriptions using Gemini AI with this library. Remember that you need an API key for the Gemini service to do this!

Features

  • 📚 Retrieves book information from Amazon using the ISBN number.
  • 🖼️ Returns detailed information such as book cover, title, author, genre, and publication date.
  • 🕒 Customizable delay between requests.
  • Tests integrated with Mocha and Chai.
  • 🌐 Web data is fetched and parsed using Axios and Cheerio.
  • 🤖 Book descriptions created with Gemini AI!

🎯 Requirements

  • Node.js (v14 veya üzeri)
  • NPM
  • Internet connection
  • Curiosity
  • Preferred Gemini AI API Key!

📦 Installation

npm install szbk-amazon-book-search

🚀 Usage

The following example shows how to use the API:

const AmazonBookSearch = require("szbk-amazon-book-search");

(async () => {
  try {
    const BookSearch = new AmazonBookSearch("en");
    const bookDetails = await BookSearch.getBookDetails("0593724283");
    // const bookDetails = await BookSearch.getBookDetails("0593724283", "Gemini API Key");

    console.log(bookDetails);
  } catch (error) {
    console.error("Error:", error.message);
  }
})();


// Example Output:
{
  title: 'The Desert Spear: Book Two of The Demon Cycle',
  thumbImage: 'https://m.media-amazon.com/images/I/51VC3BV9KBL._SY445_SX342_.jpg',
  authorName: 'Peter V. Brett',
  description: 'INTERNATIONAL BESTSELLER •  “[Peter V. Brett] confirms his place among epic fantasys pantheon of greats amid the likes of George R. R. Martin, Steven Erikson, and Robert Jordan.”—Fantasy Book Critic The second volume in the internationally bestselling Demon Cycle series continues the epic tale of humanitys last stand against an army of demons—and reveals a new contender for the role of savior. The sun is setting on humanity. The night now belongs to voracious demons that prey upon a dwindling population forced to cower behind half-forgotten symbols of power. Legends tell of a Deliverer: a general who once bound all mankind into a single force that defeated the demons. But is the return of the Deliverer just another myth?  Out of the sands rides Ahmann Jardir, who has forged the desert tribes of Krasia into a demon-killing army. He has proclaimed himself SharDama Ka, the Deliverer, and carries ancient weapons—a spear and a crown—that give credence to his claim.  But the Northerners claim their own Deliverer: the Warded Man, a dark, forbidding figure. Once, the SharDama Ka and the Warded Man were friends. Now they are fierce adversaries. Yet as old allegiances are tested and fresh alliances forged, all are unaware of the appearance of a new breed of demon, more intelligent—and deadly—than any that have come before.  Includes a bonus Demon Cycle novella, Brayans Gold, and a Krasian dictionaryDont miss any of the thrilling novels in Peter V. Bretts Demon Cycle THE WARDED MAN • THE DESERT SPEAR • THE DAYLIGHT WAR • THE SKULL THRONE • THE CORE',
  page: 864,
  publisher: 'Del Rey',
  isbn: '0593724283',
  date: 'November 7, 2023',
  rate: '4.5'
}

📂 Project Structure

szbk-amazon-search-book
├── config
   └── index.js        # Configuration file
├── lib
   ├── index.js        # AmazonBookSearch class
   └── module.js       # Data processing and parsing operations
├── test
   └── index.js        # Integration tests
├── index.js            # Entry point
├── package.json        # Dependencies and scripts
└── README.md           # Documentation

🧪 Tests

To run the tests, follow these steps:

  1. Install test dependencies:
    npm install
    
  2. Run the tests:
    npm test
    
Description
No description provided
Readme 48 KiB
Languages
JavaScript 100%