From 8a9ae4a175114ab905eb37991ec587b9a524a645 Mon Sep 17 00:00:00 2001 From: wisecolt Date: Sat, 7 Mar 2026 01:40:40 +0300 Subject: [PATCH] docs: update setup and usage for packaged wscraper CLI --- README.md | 35 ++++++++++++++++++++++++++--------- 1 file changed, 26 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index da32e4e..4391ef9 100644 --- a/README.md +++ b/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 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 ```