docs: update setup and usage for packaged wscraper CLI
This commit is contained in:
35
README.md
35
README.md
@@ -1,6 +1,6 @@
|
||||
# wscraper
|
||||
|
||||
HappyFappy için komutlar `wscraper.py` üzerinden çalışır. Proje ileride başka siteleri de destekleyecek şekilde yapılandırılmıştır.
|
||||
HappyFappy için komutlar paketlenmiş `wscraper` CLI üzerinden çalışır. Proje çoklu site desteği için `src/` paket yapısına göre düzenlenmiştir.
|
||||
|
||||
## 1) Repo Clone
|
||||
|
||||
@@ -17,7 +17,7 @@ cd <REPO_FOLDER>
|
||||
python3.12 -m venv .venv
|
||||
source .venv/bin/activate
|
||||
python -m pip install -U pip
|
||||
python -m pip install -r requirements.txt
|
||||
python -m pip install -e .
|
||||
scrapling install
|
||||
```
|
||||
|
||||
@@ -27,7 +27,7 @@ scrapling install
|
||||
py -3.12 -m venv .venv
|
||||
.venv\Scripts\Activate.ps1
|
||||
python -m pip install -U pip
|
||||
python -m pip install -r requirements.txt
|
||||
python -m pip install -e .
|
||||
scrapling install
|
||||
```
|
||||
|
||||
@@ -37,24 +37,24 @@ scrapling install
|
||||
py -3.12 -m venv .venv
|
||||
.venv\Scripts\activate.bat
|
||||
python -m pip install -U pip
|
||||
python -m pip install -r requirements.txt
|
||||
python -m pip install -e .
|
||||
scrapling install
|
||||
```
|
||||
|
||||
Not: Ortamı aktive ettikten sonra komutları `python ...` şeklinde çalıştırman yeterli, `.venv/bin/python` yazmak zorunda değilsin.
|
||||
Not: Ortamı aktive ettikten sonra komutlar `wscraper ...` olarak kullanılabilir. İstersen `python -m wscraper ...` da kullanabilirsin.
|
||||
|
||||
## 3) HappyFappy Komutları
|
||||
|
||||
### Bookmarks Çekme
|
||||
|
||||
```bash
|
||||
python wscraper.py happyfappy --action get-bookmarks -c cookies.txt -o bookmarks.json
|
||||
wscraper happyfappy --action get-bookmarks -c cookies.txt -o bookmarks.json
|
||||
```
|
||||
|
||||
### Torrent Dosyası İndirme
|
||||
|
||||
```bash
|
||||
python wscraper.py happyfappy --action download-torrent-files -u "https://www.happyfappy.net/torrents.php?id=110178" -c cookies.txt -o torrent
|
||||
wscraper happyfappy --action download-torrent-files -u "https://www.happyfappy.net/torrents.php?id=110178" -c cookies.txt -o torrent
|
||||
```
|
||||
|
||||
## 4) Kısa Alias Kullanımı
|
||||
@@ -62,6 +62,23 @@ python wscraper.py happyfappy --action download-torrent-files -u "https://www.ha
|
||||
```bash
|
||||
# site alias: hf
|
||||
# action alias: gb (get-bookmarks), dtf (download-torrent-files)
|
||||
python wscraper.py hf -a gb -c cookies.txt -o bookmarks.json
|
||||
python wscraper.py hf -a dtf -u "https://www.happyfappy.net/torrents.php?id=110178" -c cookies.txt -o torrent
|
||||
wscraper hf -a gb -c cookies.txt -o bookmarks.json
|
||||
wscraper hf -a dtf -u "https://www.happyfappy.net/torrents.php?id=110178" -c cookies.txt -o torrent
|
||||
```
|
||||
|
||||
## 5) Proje Dizini
|
||||
|
||||
```text
|
||||
.
|
||||
├── pyproject.toml
|
||||
├── requirements.txt
|
||||
├── src/
|
||||
│ └── wscraper/
|
||||
│ ├── __init__.py
|
||||
│ ├── __main__.py
|
||||
│ ├── cli.py
|
||||
│ └── sites/
|
||||
│ ├── __init__.py
|
||||
│ └── happyfappy.py
|
||||
└── README.md
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user