Skip to content

hanaarena/jlpt-grammar-scraper

Repository files navigation

JLPT grammar quiz scraper

below is JLPT grammar website (https://mainichi-nonbiri.com/japanese-grammar) scrapper usage (default crawler)

Installation

# use pnpm
pnpm install

Usage

Get all grammar link split by level

should run this script first

pnpm start:link

Get all grammar detail

default scraping level is N5, you can change it in getDetail.js:

const level = "n5" // n5, n4, n3, n2, n1, n0(not categorized)
pnpm start:detail

Combine all grammar detail in to one file

after finished start:detail(you dont have to run all level(n1~n5) all details, choose you want), run this script to combine all grammar detail files in to one file by level

pnpm start:all

files generated in output/grammar folder

Other

all output files are in output folder

NOTICE

  • if detail json file's 例文 value is empty, it means the grammar detail page is special, you need to check it manually.
  • recommend to use output/grammar/all_nX.json files in your project

Another crawler

for website: link

files: /nihongokyoshi-net-com

Usages

获取所有 grammar 链接列表

pnpm start:link2

获取所有 grammar 详情

pnpm start:detail2

按N1~5整合 grammar 至独立文件

pnpm start:all2

About

use for JLPT grammar quiz

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published