Skip to content

Novel Hunter Scraper is a web scraper that extracts novel data such as rankings, details, chapters, and chapter content from websites.

License

Notifications You must be signed in to change notification settings

abhishek-shivale/novel-hunter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Novel Hunter Logo

Novel Hunter

Novel Hunter

Novel Hunter is a Flask-based web scrapper designed to provide novel rankings, chapter lists, and detailed novel information. It allows users to fetch top-ranked novels, retrieve chapter listings, and explore specific novel details via simple API endpoints.

This project is designed to make it easier for users to discover and read their favorite novels, with features like fetching top novels by category, viewing detailed novel information, and navigating through chapters.


Features

  • Top Novel List: Retrieves a list of top-ranked novels based on time frame and genre.
  • Novel Information: Fetches detailed information about a specific novel.
  • Chapter List: Displays a list of chapters for a specific novel.
  • Chapter Information: Shows detailed information for a specific chapter.

API Endpoints

1. Home Route

  • URL: /
  • Method: GET
  • Description: Returns the home content of the application.

2. Top Novel List

  • URL: /novel
  • Method: GET
  • Query Parameters:
    • time: Time frame for the ranking (e.g., "Monthly")
    • type: Type of novel (e.g., "Fantasy", "Action")
  • Description: Retrieves a list of top-ranked novels based on the specified time and type.

Example Request:

GET /novel?time=Monthly&type=Fantasy

Example Response:

{
  "status": "success",
  "novel_list": [
    {"title": "Novel 1", "rank": 1},
    {"title": "Novel 2", "rank": 2}
  ]
}

3. Novel Information

  • URL: /novels/<url>
  • Method: GET
  • Description: Retrieves detailed information about a specific novel using its URL.

Example Request:

GET /novels/novel-123

Example Response:

{
  "status": "success",
  "novel_info": {
    "title": "Novel 1",
    "author": "Author Name",
    "genre": "Fantasy"
  }
}

4. Chapters List

  • URL: /chapters/<url>/<number>
  • Method: GET
  • Description: Retrieves a list of chapters for a specific novel and chapter number.

Example Request:

GET /chapters/novel-123/1

Example Response:

{
  "status": "success",
  "chapters": [
    {"chapter_title": "Chapter 1", "chapter_link": "link_to_chapter_1"},
    {"chapter_title": "Chapter 2", "chapter_link": "link_to_chapter_2"}
  ]
}

5. Chapter Information

  • URL: /info/<url>/<id>
  • Method: GET
  • Description: Retrieves detailed information about a specific chapter of a novel.

Example Request:

GET /info/novel-123/1

Example Response:

{
  "status": "success",
  "chapter_info": {
    "title": "Chapter 1",
    "content": "This is the content of chapter 1..."
  }
}

Running the Application Locally

Prerequisites

  • Python 3.x
  • Flask

Setup

  1. Clone the repository:

    git clone https://github.com/abhishek-shivale/novel-hunter.git
    cd novel-hunter
  2. Install the required dependencies:

    pip install -r requirements.txt
  3. Run the Flask app:

    python app.py
  4. Visit http://127.0.0.1:5000 in your browser to view the application.


requirements.txt Example

Flask==2.0.2

Contributing

  1. Fork the repository.
  2. Create a new branch for your feature or bug fix.
  3. Make your changes and commit them.
  4. Push your changes to your forked repository.
  5. Open a pull request to the main repository.

License

This project is licensed under the MIT License - see the LICENSE file for details.


Author

Novel Hunter is maintained by abhishek. Feel free to open an issue or contribute to the project!

About

Novel Hunter Scraper is a web scraper that extracts novel data such as rankings, details, chapters, and chapter content from websites.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages