An open API service indexing awesome lists of open source software.

https://github.com/xcrypt0r/watchdog

๐Ÿถ Dcinside image crawler that includes NSFW detection (Enhanced version of Hyacinth)
https://github.com/xcrypt0r/watchdog

crawler crawling dc dcinside nodejs nsfw parsing tensorflow

Last synced: 3 months ago
JSON representation

๐Ÿถ Dcinside image crawler that includes NSFW detection (Enhanced version of Hyacinth)

Awesome Lists containing this project

README

          

# Watchdog
[![Language](https://img.shields.io/badge/Language-Typescript-3178c6?style=for-the-badge&logo=typescript)][typescript]
[![GPL License](https://img.shields.io/badge/License-GPL--3.0-28a745?style=for-the-badge&logo=github)](LICENSE)
[![Repo Size](https://img.shields.io/github/languages/code-size/xCrypt0r/Watchdog?style=for-the-badge&label=SIZE&color=lightgrey&logo=github)](/../../)
[![Github Action](https://img.shields.io/github/actions/workflow/status/xcrypt0r/Watchdog/docker-build.yml?branch=main&style=for-the-badge&logo=githubactions)](https://github.com/xcrypt0r/Watchdog/actions/workflows/docker-build.yml)
[![Image Size](https://img.shields.io/docker/image-size/xcrypt0r/watchdog?style=for-the-badge&label=SIZE&logo=docker)](https://hub.docker.com/r/xcrypt0r/watchdog)

๐Ÿถ **Watchdog** is a Dcinside image crawler that includes NSFW detection.

## ๋ชฉ์ฐจ
- [Watchdog](#watchdog)
- [๋ชฉ์ฐจ](#๋ชฉ์ฐจ)
- [์†Œ๊ฐœ](#์†Œ๊ฐœ)
- [์„ค์น˜](#์„ค์น˜)
- [๋นŒ๋“œ ๊ฒฐ๊ณผ](#๋นŒ๋“œ-๊ฒฐ๊ณผ)
- [๊ณตํ†ต](#๊ณตํ†ต)
- [๋กœ์ปฌ](#๋กœ์ปฌ)
- [๋„์ปค](#๋„์ปค)
- [์‚ฌ์šฉ๋ฒ•](#์‚ฌ์šฉ๋ฒ•)
- [์ €์ž](#์ €์ž)
- [๋ผ์ด์„ ์Šค](#๋ผ์ด์„ ์Šค)

## ์†Œ๊ฐœ
**Watchdog**์€ Node.js๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ [๋””์‹œ์ธ์‚ฌ์ด๋“œ](https://www.dcinside.com)์—์„œ ์ด๋ฏธ์ง€๋ฅผ ํฌ๋กค๋งํ•˜๊ณ 
[TensorFlow](https://github.com/tensorflow/tfjs) ๊ธฐ๋ฐ˜ NSFW ๋ชจ๋ธ์„ ํ†ตํ•ด ์ด๋ฏธ์ง€์˜ NSFW ์—ฌ๋ถ€๋ฅผ ํŒ๋‹จํ•˜๊ณ  ๋ถ„๋ฅ˜ํ•˜๋Š” ํ”„๋กœ๊ทธ๋žจ์ž…๋‹ˆ๋‹ค.

![](https://i.imgur.com/cco1UO6.png)
![](https://i.imgur.com/x5Jnzs5.png)

## ์„ค์น˜
### ๋นŒ๋“œ ๊ฒฐ๊ณผ
|์šด์˜์ฒด์ œ|๊ฒฐ๊ณผ|
|---|:---:|
|Windows logo Windows 11|โœ… ์„ฑ๊ณต|
|Ubuntu logo Ubuntu 24.04|โœ… ์„ฑ๊ณต|
|macOS logo macOS Sequoia|โœ… ์„ฑ๊ณต|

### ๊ณตํ†ต
1. ์ด ๋ ˆํฌ์ง€ํ† ๋ฆฌ๋ฅผ [๋‹ค์šด๋กœ๋“œ](https://github.com/xCrypt0r/Watchdog/releases)ํ•ฉ๋‹ˆ๋‹ค.
1. [Node.js][node.js]์™€ [npm][npm]์„ ์„ค์น˜ํ•ฉ๋‹ˆ๋‹ค.
- ํ˜ธํ™˜๋˜๋Š” ๋ฒ„์ „์€ **20.x** ๋˜๋Š” **22.x**์ž…๋‹ˆ๋‹ค.[^1]
- ๋‹ค๋ฅธ Node.js ๋ฒ„์ „์„ ์‚ฌ์šฉ ์ค‘์ผ ๊ฒฝ์šฐ [.nvmrc](.nvmrc) ํŒŒ์ผ์„ ์ฐธ๊ณ ํ•ด ๊ถŒ์žฅ ๋ฒ„์ „์„ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
[nvm](https://github.com/nvm-sh/nvm)์„ ์„ค์น˜ํ•˜๊ณ  ๋‹ค์Œ ๋ช…๋ น์–ด๋กœ ๊ถŒ์žฅ ๋ฒ„์ „์„ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.
```bash
nvm install 22
nvm use 22
node -v
```
2. `npm install`์„ ์ž…๋ ฅํ•˜์—ฌ ์˜์กด์„ฑ์„ ์„ค์น˜ํ•ฉ๋‹ˆ๋‹ค.

### ๋กœ์ปฌ
1. [Python][python] **3.x** ๋ฒ„์ „์„ ์„ค์น˜ํ•ฉ๋‹ˆ๋‹ค.
2. TensorFlow ๋นŒ๋“œ ๋„๊ตฌ๋ฅผ ์„ค์น˜ํ•ฉ๋‹ˆ๋‹ค.
#### Windows
[Microsoft C++ Build Tools](https://visualstudio.microsoft.com/ko/visual-cpp-build-tools)๋ฅผ ์„ค์น˜ํ•ฉ๋‹ˆ๋‹ค. ([๋งํฌ](https://rinkesh-patel.medium.com/easy-way-to-install-tensorflow-tfjs-node-in-windows-11-machine-158f049d9efa) ์ฐธ๊ณ )

#### Linux
`sudo apt-get install build-essential`

#### macOS
`xcode-select --install`
1. [.env.example](.env.example)์„ `.env`๋กœ, [targets.example.json](targets.example.json)์„ `targets.json`์œผ๋กœ ๋ณ€๊ฒฝํ•ฉ๋‹ˆ๋‹ค.
1. `npm start` ๋˜๋Š” `npm run pm2:start`๋ฅผ ์ž…๋ ฅํ•˜์—ฌ ํ”„๋กœ๊ทธ๋žจ์„ ์‹คํ–‰ํ•ฉ๋‹ˆ๋‹ค.

### ๋„์ปค
1. [Docker][docker]๋ฅผ ์„ค์น˜ํ•ฉ๋‹ˆ๋‹ค.
1. **(์˜ต์…˜)** Docker Desktop์˜ ์„ค์ •์—์„œ ์ตœ๋Œ€ ๋ฉ”๋ชจ๋ฆฌ ์‚ฌ์šฉ๋Ÿ‰์„ ์กฐ์ •ํ•ฉ๋‹ˆ๋‹ค.
- ์ด ํ”„๋กœ๊ทธ๋žจ์€ [ecosystem.config.js](ecosystem.config.js#L10)์˜ ์„ค์ •์— ๋”ฐ๋ผ pm2 ์‚ฌ์šฉ ์‹œ ์ตœ๋Œ€ 16GB๊นŒ์ง€ ๋ฉ”๋ชจ๋ฆฌ๋ฅผ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์œผ๋ฏ€๋กœ, Docker ๋ฉ”๋ชจ๋ฆฌ ์ œํ•œ์„ ์ด ์ด์ƒ์œผ๋กœ ์„ค์ •ํ•˜๊ฑฐ๋‚˜ ecosystem.config.js๋ฅผ ์ˆ˜์ •ํ•˜์„ธ์š”.[^2]

![](https://i.imgur.com/R7QZi2d.png)

2. ์•„๋ž˜ ๋‘ ๊ฐ€์ง€ ๋ฐฉ๋ฒ• ์ค‘ ํ•˜๋‚˜๋ฅผ ์„ ํƒํ•˜์„ธ์š”.
- **(๊ถŒ์žฅ)** Docker Hub์—์„œ ์ด๋ฏธ์ง€๋ฅผ ๋‚ด๋ ค๋ฐ›์•„ ์ปจํ…Œ์ด๋„ˆ๋ฅผ ์‹คํ–‰ํ•ฉ๋‹ˆ๋‹ค.
1. `npm run docker:up`
- ๋กœ์ปฌ์—์„œ ์ด๋ฏธ์ง€๋ฅผ ๋นŒ๋“œํ•˜๊ณ  ์‹คํ–‰ํ•ฉ๋‹ˆ๋‹ค.
1. [.env.example](.env.example)์„ `.env`๋กœ, [targets.example.json](targets.example.json)์„ `targets.json`์œผ๋กœ ๋ณ€๊ฒฝํ•ฉ๋‹ˆ๋‹ค.
2. `npm run docker:build`

## ์‚ฌ์šฉ๋ฒ•
- ๊ธฐ๋ณธ์ ์œผ๋กœ ์ด๋ฏธ์ง€๋Š” ๋ ˆํฌ์ง€ํ† ๋ฆฌ ํ•˜์œ„์˜ archive ํด๋” ๋‚ด์— ์ €์žฅ๋ฉ๋‹ˆ๋‹ค.
์ €์žฅ ์œ„์น˜๋Š” [.env](.env.example)ํŒŒ์ผ์˜ **LOCAL_ARCHIVE_DIR** ๊ฐ’์„ ์ˆ˜์ •ํ•˜์—ฌ ๋ณ€๊ฒฝํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
- [targets.json](targets.example.json)์„ ์ˆ˜์ •ํ•˜์—ฌ ํฌ๋กค๋ง ๋Œ€์ƒ ๊ฐค๋Ÿฌ๋ฆฌ๋ฅผ ๊ด€๋ฆฌํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.[^3]
- ๋Œ€์ƒ ๊ฐค๋Ÿฌ๋ฆฌ๋Š” ๋‹ค์Œ๊ณผ ๊ฐ™์€ ํ˜•์‹์œผ๋กœ ์ž…๋ ฅํ•ฉ๋‹ˆ๋‹ค.

```json
"๊ฐค๋Ÿฌ๋ฆฌ ์•„์ด๋””": {
"name": "๊ฐค๋Ÿฌ๋ฆฌ ์ด๋ฆ„",
"type": "๊ฐค๋Ÿฌ๋ฆฌ ํƒ€์ž…"
}
```
- ๊ฐค๋Ÿฌ๋ฆฌ ์•„์ด๋””๋Š” ๊ฐค๋Ÿฌ๋ฆฌ URL์—์„œ id=๋’ค์— ๋‚˜์˜ค๋Š” ๋ถ€๋ถ„์ž…๋‹ˆ๋‹ค.
์˜ˆ๋ฅผ ๋“ค์–ด ๊ตญ๋‚ด์•ผ๊ตฌ ๊ฐค๋Ÿฌ๋ฆฌ URL `https://gall.dcinside.com/board/lists?id=baseball_new11`์—์„œ ๊ฐค๋Ÿฌ๋ฆฌ ์•„์ด๋””๋Š” `baseball_new11`์ž…๋‹ˆ๋‹ค.
- ๊ฐค๋Ÿฌ๋ฆฌ ํƒ€์ž…์€ ๋ฉ”์ธ: `main`, ๋งˆ์ด๋„ˆ: `minor`, ๋ฏธ๋‹ˆ: `mini`๋กœ ์ž‘์„ฑํ•ฉ๋‹ˆ๋‹ค.

## ์ €์ž
Watchdog ยฉ xCrypt0r
Authored and maintained by xCrypt0r

> GitHub [**@xCrypt0r**][my github]
> Discord [**@xcrypt0r**][my discord]

## ๋ผ์ด์„ ์Šค
์ด ํ”„๋กœ์ ํŠธ๋Š” [**GNU ์ผ๋ฐ˜ ๊ณต์ค‘ ์‚ฌ์šฉ ํ—ˆ๊ฐ€์„œ ๋ฒ„์ „ 3.0 (GPLv3)**](LICENSE) ๋ผ์ด์„ ์Šค๋ฅผ ๋”ฐ๋ฆ…๋‹ˆ๋‹ค.

[^1]: ์ด์™ธ์˜ ๋ฒ„์ „ ์„ค์น˜ ์‹œ TensorFlow์˜ ์˜์กด์„ฑ ๋ฌธ์ œ๋กœ ์ œ๋Œ€๋กœ ๋™์ž‘ํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.
[^2]: Windows์—์„œ `WSL 2`๊ธฐ๋ฐ˜ Docker Desktop์„ ์‚ฌ์šฉํ•˜๋Š” ๊ฒฝ์šฐ `.wslconfig`๋กœ ๋ฉ”๋ชจ๋ฆฌ ์ œํ•œ์„ ์„ค์ •ํ•˜์„ธ์š”.
[^3]: ๋Œ€์ƒ ๊ฐค๋Ÿฌ๋ฆฌ๊ฐ€ ๋งŽ์•„์งˆ์ˆ˜๋ก ๋ฉ”๋ชจ๋ฆฌ ์‚ฌ์šฉ๋Ÿ‰์ด ๋†’์•„์ง‘๋‹ˆ๋‹ค.

[typescript]: https://www.typescriptlang.org
[node.js]: https://nodejs.org/ko
[npm]: https://www.npmjs.com
[python]: https://www.python.org/downloads
[docker]: https://docs.docker.com/get-started/get-docker
[my github]: https://github.com/xCrypt0r
[my discord]: https://discord.com/users/282821913968115713