Note
The functionality of this repository has been moved book.okaryo.io/badch/scraping.
An application that outputs JSON format reading records from BookMeter
読書メーター の読書記録をJSON形式で出力するアプリケーション
{
"recordsCount": 1,
"records": [
{
"date": "2021-11-06",
"review": "review content",
"book": {
"author": {"name": "G パスカル ザカリー"},
"page": 455,
"title": "闘うプログラマー[新装版] ビル・ゲイツの野望を担った男達(Kindle)",
"url": "https://www.amazon.co.jp/dp/product/B00GSHI04M/ref=as_li_tf_tl?camp=247&creative=1211&creativeASIN=B00GSHI04M&ie=UTF8&linkCode=as2&tag=bookmeter_book_image_image_pc_logoff-22"
}
}
],
"totalPages": 455
}
- Setup
gradlew
- Run following command
./gradlew run --args="[user id] [output file name]"
ex) ./gradlew run --args="739784 main.json only-diff"
- Then, generate reading records in
./__generated__/main.json
There are three types of arguments.
- If only the user ID is passed, JSON of the reading record will be output to the console, and no JSON file will be generated. This is a required argument.
./gradlew run --args="739784"
- If you pass a file name as the second argument, a JSON file of the reading record will be generated under the
__generated__
directory with the given file name.
./gradlew run --args="739784 main.json"
- Moreover, if you pass the string
only-diff
as the third argument, it will only scrape the record of the difference between the existing JSON file and the reading record on the current BookMeter.
./gradlew run --args="739784 main.json only-diff"