docs: add cross-platform setup and wscraper usage examples
This commit is contained in:
61
README.md
61
README.md
@@ -1,6 +1,17 @@
|
||||
# HappyFappy Bookmarks Scraper
|
||||
# wscraper
|
||||
|
||||
## Setup
|
||||
HappyFappy için komutlar `wscraper.py` üzerinden çalışır. Proje ileride başka siteleri de destekleyecek şekilde yapılandırılmıştır.
|
||||
|
||||
## 1) Repo Clone
|
||||
|
||||
```bash
|
||||
git clone <REPO_URL>
|
||||
cd <REPO_FOLDER>
|
||||
```
|
||||
|
||||
## 2) Kurulum
|
||||
|
||||
### macOS / Linux
|
||||
|
||||
```bash
|
||||
python3.12 -m venv .venv
|
||||
@@ -10,17 +21,47 @@ python -m pip install -r requirements.txt
|
||||
scrapling install
|
||||
```
|
||||
|
||||
## Run
|
||||
### Windows (PowerShell)
|
||||
|
||||
```bash
|
||||
.venv/bin/python scrape_happyfappy_bookmarks.py --cookie-file cookies.txt --output bookmarks.json
|
||||
```powershell
|
||||
py -3.12 -m venv .venv
|
||||
.venv\Scripts\Activate.ps1
|
||||
python -m pip install -U pip
|
||||
python -m pip install -r requirements.txt
|
||||
scrapling install
|
||||
```
|
||||
|
||||
## Download Single Torrent
|
||||
### Windows (CMD)
|
||||
|
||||
```bat
|
||||
py -3.12 -m venv .venv
|
||||
.venv\Scripts\activate.bat
|
||||
python -m pip install -U pip
|
||||
python -m pip install -r requirements.txt
|
||||
scrapling install
|
||||
```
|
||||
|
||||
Not: Ortamı aktive ettikten sonra komutları `python ...` şeklinde çalıştırman yeterli, `.venv/bin/python` yazmak zorunda değilsin.
|
||||
|
||||
## 3) HappyFappy Komutları
|
||||
|
||||
### Bookmarks Çekme
|
||||
|
||||
```bash
|
||||
.venv/bin/python download_happyfappy_torrent.py \
|
||||
--url "https://www.happyfappy.net/torrents.php?id=110178" \
|
||||
--cookie-file cookies.txt \
|
||||
--output-dir torrent
|
||||
python wscraper.py 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
|
||||
```
|
||||
|
||||
## 4) Kısa Alias Kullanımı
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user