Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
Alfred 76a7819dad Improve stream extraction robustness 4 dni temu
cmd/radiostreamscan Improve stream extraction robustness 4 dni temu
internal/extractor Improve stream extraction robustness 4 dni temu
.gitignore chore: import radio-stream-extractor 5 dni temu
README.md Improve stream extraction robustness 4 dni temu
go.mod Improve stream extraction robustness 4 dni temu
go.sum Improve stream extraction robustness 4 dni temu

README.md

radio-stream-extractor

radiostreamscan ist ein Go-Tool, das Radio-Streams aus Webseiten extrahiert. Es unterstützt:

  • Web-UI (Default): Start ohne Argumente öffnet einen Server auf :8080 mit Formular + JSON-Endpoint.
  • CLI-Modus: Übergibst du URLs als Argumente, werden Streams direkt ausgegeben.
  • Playlist-Auflösung: m3u/m3u8/pls/xspf/json werden erkannt, geladen und in echte Stream-URLs aufgelöst.
  • Probing: optionaler HEAD-Check für Stream-URLs (-probe).
  • Export: -format text|json|csv|pls.
  • History-Log: Ergebnisse werden als JSONL in history.jsonl gespeichert (abschaltbar mit -history "").
  • Concurrency: parallelisierte Fetches mit -concurrency.

Web-Server-Modus (Standard)

go run ./cmd/radiostreamscan

Danach erreichst du die UI unter http://localhost:8080/ (inkl. Ergebnis-Ansicht mit Copy-to-Clipboard). Der JSON-Endpoint ist:

/scan?url=https://example.com

Mehrere URLs:

/scan?url=a&url=b&url=c

CLI-Modus

go run ./cmd/radiostreamscan https://live24.gr/radio/generic.jsp?sid=2676

Flags (Auszug)

  • -format (text|json|csv|pls)
  • -probe (true/false)
  • -header "Key: Value" (repeatable)
  • -proxy http://host:port
  • -history history.jsonl (leer = aus)
  • -watch 30s (CLI wiederholt den Scan)
  • -concurrency 4
  • -timeout 15s (HTTP Timeout pro Request)
  • -probe-timeout 8s
  • -allow-private (lokale/private Ziele erlauben)

Build / EXE

go build -o radiostreamscan.exe ./cmd/radiostreamscan

Die EXE enthält Web-Server und CLI in einem Binary.

Tests

go test ./...

Projektstruktur

  • cmd/radiostreamscan: Hauptentrypoint mit URL-Scan, Webserver und Exporten
  • internal/extractor: Parser für Candidate-URLs + Playlist-Parser mit Unit-Tests