Skip to content

qnaplus/scraper

Repository files navigation

scraper

A set of utilities focused on scraping the VEX Robotics Q&A.

Usage

Retreiving All Questions

import { getAllQuestions } from "@qnaplus/scraper";

(async () => {
    const questions = await getAllQuestions();
})();

Retreiving and Filtering Questions

import { getQuestions } from "@qnaplus/scraper";

(async () => {
    // gets all questions from the current season
    const currentSeasonQuestions = await getQuestions();

    // get all questions from a particular season
    const specificSeasonQuestions = await getQuestions(["2020-2021"]);

    // get all VURC questions from the 2020-2021 season
    const filteredQuestions = await getQuestions({
        VURC: ["2020-2021"]
    });
})();

Retrieving Unanswered Questions

import { getUnansweredQuestions } from "@qnaplus/scraper";

(async () => {
    const questions = await getUnansweredQuestions();
})();