Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shinosaki/2ch-api-worker
2ch・5chのHTMLをdatに変換するCloudflare Workersアプリ/Convert 2ch (5ch) HTML to dat file on Cloudflare Workers.
https://github.com/shinosaki/2ch-api-worker
2ch 5ch cloudflare-workers proxy
Last synced: 3 months ago
JSON representation
2ch・5chのHTMLをdatに変換するCloudflare Workersアプリ/Convert 2ch (5ch) HTML to dat file on Cloudflare Workers.
- Host: GitHub
- URL: https://github.com/shinosaki/2ch-api-worker
- Owner: shinosaki
- License: mit
- Created: 2023-04-19T01:10:42.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-15T10:53:29.000Z (about 1 year ago)
- Last Synced: 2024-05-30T02:14:46.023Z (8 months ago)
- Topics: 2ch, 5ch, cloudflare-workers, proxy
- Language: JavaScript
- Homepage:
- Size: 93.8 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 2ch-api-worker
2ch-api-workerは2ちゃんねる(5ちゃんねる)のHTMLをdat形式に変換するCloudflare Workersアプリケーションです。
## ToDo
- [ ] linkedomからHTMLRewriterに移行- [ ] サーバー移転の追従
## 使用方法
~~2chのURL(`https://greta.5ch.net/test/read.cgi/poverty/1653843928/`)のドメイン名部分(`greta.5ch.net`)をWorkerのドメイン名(``)に置き換えてアクセスするだけです。~~下記のいずれか(read.cgi or dat)のURL形式に対応してます。
- `https:///test/read.cgi/<板/board>/<スレッドID/Thread ID>`
- `https:///<板/board>/dat/<スレッドID/Thread ID>.dat`応答はShift-JISでエンコードされた[2chのdat](https://info.5ch.net/index.php/Monazilla/develop/dat)です。
URL末尾にクエリパラメータ`?charset=utf-8`を追加するとUTF-8になります。
### chMateの設定
[設定]→[実験的]→[検索に使うURL(追加用)]にコレを入力
```
過去ログ https:///test/read.cgi/{$bbs}/{$key}/
```## 制限
- 書き込みには対応してないよ!
- 国外IPアドレスからのアクセスは[451 Unavailable For Legal Reasons](https://ja.wikipedia.org/wiki/HTTP_451)で弾かれるみたい## Deploy
1. `git clone https://github.com/shinosaki/2ch-api-worker.git`
2. `cd 2ch-api-worker`
3. `npm install`
4. `npx wrangler login`
5. Edit `wrangler.toml`
6. `npm run deploy`## License
[MIT](https://raw.githubusercontent.com/shinosaki/2ch-api-worker/main/LICENSE)