npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

eduscout

v1.1.0

Published

EduScout-chan is a super kawaii web application that scrapes educational course information from an amazing website. It uses AI-driven smart scraping techniques to extract relevant data from the course pages and provides an API endpoint to check for new c

Downloads

5

Readme

EduScout ✨📚🎓

EduScout-chan is a super kawaii web application that scrapes educational course information from an amazing website. It uses AI-driven smart scraping techniques to extract relevant data from the course pages and provides an API endpoint to check for new courses periodically. 😄🌟

Requirements 🛠️

  • Node.js 🚀
  • Express.js ⚡
  • Axios 🌐
  • Cheerio 🍀
  • Cors 🌈

Installation 💻

  1. Clone the repository: 📥
git clone https://github.com/well300/EduScout/
  1. Navigate to the project directory: 📂
cd EduScout
  1. Install the dependencies: ⚙️
npm install

Usage 🚀

  1. Start the application: 🌟
node app.js
  1. The application will start a sugoi server on http://localhost:3000. 🎉🎊

  2. To check for new courses, make a GET request to https://eduscout.vercel.app/api/courses. ✨📝

Example Syntax for using the API Endpoint:

const axios = require('axios');

axios.get('https://eduscout.vercel.app/api/courses')
  .then(response => {
    if (response.data.newCourses) {
      const courses = response.data.courses;
      console.log('New courses available:');
      courses.forEach(course => {
        console.log('Name:', course.name);
        console.log('Udemy Link:', course.udemyLink);
        console.log('Image URL:', course.image);
        console.log('----------------------');
      });
    } else {
      console.log('No new courses available.');
    }
  })
  .catch(error => {
    console.error('An error occurred:', error);
  });

This code makes a GET request to the API endpoint https://eduscout.vercel.app/api/courses and retrieves the response. If new courses are available (response.data.newCourses is true), it iterates over the courses array (response.data.courses) and logs the course name, Udemy link, and image URL. If no new courses are available, it logs a message indicating that.

API Endpoint 🌐

Check for New Courses 🆕

  • Endpoint: /api/courses
  • Method: GET

This sugoi endpoint checks for new courses on an amazing website. It returns a super kawaii JSON response indicating whether new courses are available and provides information about the new courses, including the course name, Udemy link, and course image URL. 🎉💖

Example response when new courses are available:

{
  "newCourses": true,
  "courses": [
    {
      "name": "Course 1",
      "udemyLink": "https://www.udemy.com/course/course-1",
      "image": "https://www.example.com/image1.jpg"
    },
    {
      "name": "Course 2",
      "udemyLink": "https://www.udemy.com/course/course-2",
      "image": "https://www.example.com/image2.jpg"
    }
  ]
}

Example response when no new courses are available:

{
  "newCourses": false
}

Configuration ⚙️

The following variables can be configured in the

Apologies for the incomplete response. Here's the continuation of the Configuration section in the README:

  • DOMAIN: The base URL of the website to scrape (default: <website_url>).
  • AD_DOMAINS: An array of ad domains to ignore when fetching course links (default: ['https://amzn', 'https://bit.ly']).
  • maxPages: The maximum number of pages to scrape (default: null).

Notes 📝

  • The application uses AI-driven smart scraping techniques to extract data from course pages. Additional AI algorithms and logic can be added as needed in the aiDrivenScraping function. 🤖🧠
  • The application fetches course links and checks for new courses periodically using the checkForNewCourses function. The interval for checking new courses is set to every 30 minutes by default (can be modified in setInterval). ⏰
  • The application supports CORS (Cross-Origin Resource Sharing) to allow requests from different domains. CORS can be enabled or disabled by modifying the app.use(cors()) line. 🌍🔒

License 📄

This project is licensed under the super sugoi MIT License. ❤️🌟