Get acestreams from multiple sites together into a single list, with Zeronet support. Multi-arch
7.1K
A Python-based web scraping application that retrieves Acestream channel information and generates M3U playlists. Built using Flask, BeautifulSoup, and SQLAlchemy.
Create a docker-compose.yml file:
version: '3.8'
services:
acestream-scraper:
image: visesa84/acestream-scraper-pyacexy:latest
container_name: acestream-scraper
cap_add:
- NET_ADMIN
- SYS_ADMIN
devices:
- /dev/net/tun:/dev/net/tun
sysctls:
- net.ipv4.conf.all.src_valid_mark=1
- net.ipv4.ip_forward=1
environment:
- TZ=Europe/Madrid
- ENABLE_TOR=false
- ENABLE_ACEXY=true
- ENABLE_ACESTREAM_ENGINE=true
- CHECKSTATUS_ENABLED=true
- ENABLE_WARP=false
- CONTAINER_NETWORK_MODE=host
- WARP_LICENSE_KEY=
- ACESTREAM_HTTP_PORT=6878
- ACESTREAM_HTTP_HOST=ACEXY_HOST
- FLASK_PORT=8040
- ACEXY_LISTEN_ADDR=:8080
- ACEXY_HOST=localhost
- ACEXY_PORT=6878
- ACEXY_NO_RESPONSE_TIMEOUT=15
- ACEXY_BUFFER_SIZE=5
- LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so.2
- MALLOC_CONF=dirty_decay_ms:1000,muzzy_decay_ms:1000
- EXTRA_FLAGS="--cache-dir /tmp --cache-limit 2 --log-stderr --log-stderr-level error --max-connections 300 --max-peers 50 --core-dlrate-helper 0 --stats-report-interval 10 --live-cache-type memory --live-cache-size 209715200"
ports:
- "8040:8040" # Flask application
- "8080:8080" # proxy
- "8621:8621" # Acestream P2P Port
- "43110:43110" # ZeroNet UI
- "43111:43111" # ZeroNet peer
- "26552:26552" # ZeroNet peer
volumes:
- ./data/zeronet:/app/ZeroNet/data
- ./data/config:/app/config
- ./data/recordings:/app/config/recordings
healthcheck:
test: ["CMD", "/app/healthcheck.sh"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
Start the service:
docker-compose up -d
Access the application at http://localhost:8040
Pull and run the container:
docker pull visesa84/acestream-scraper-pyacexy:latest
docker run -d \
-p 8040:8040 \
-v "${PWD}/config:/app/config" \
-v "${PWD}/recordings:/app/config/recordings" \
--name acestream-scraper \
visesa84/acestream-scraper-pyacexy:latest
Access the setup wizard:
Open your browser and navigate to http://localhost:8040
The first-time setup wizard will guide you through configuration:
Alternative: Manual configuration
Create a config/config.json file:
{
"urls": [
"https://example.com/url1",
"https://example.com/url2"
],
"base_url": "http://127.0.0.1:8080/ace/getstream?id=",
"ace_engine_url": "http://127.0.0.1:6878"
}
The image includes an embedded Acestream engine with the PyAcexy proxy interface, which provides a user-friendly web UI:
docker run -d \
-p 8040:8040 \
-p 8080:8080 \
-e ENABLE_ACEXY=true \
-e ENABLE_ACESTREAM_ENGINE=true \
-v "${PWD}/config:/app/config" \
-v "${PWD}/recordings:/app/config/recordings" \
--name acestream-scraper \
visesa84/acestream-scraper-pyacexy:latest
PyAcexy only exposes an status endpoint available at http://localhost:8080/ace/status.
You can connect the PyAcexy proxy to an external Acestream Engine instance:
docker run -d \
-p 8040:8040 \
-p 8080:8080 \
-e ENABLE_ACEXY=true \
-e ENABLE_ACESTREAM_ENGINE=false \
-e ACEXY_HOST=192.168.1.100 \
-e ACEXY_PORT=6878 \
-v "${PWD}/config:/app/config" \
-v "${PWD}/recordings:/app/config/recordings" \
--name acestream-scraper \
visesa84/acestream-scraper-pyacexy:latest
The application can scrape ZeroNet sites for channel information:
docker run -d \
-p 8040:8040 \
-p 43110:43110 \
-p 43111:43111 \
-v "${PWD}/config:/app/config" \
-v "${PWD}/recordings:/app/config/recordings" \
-v "${PWD}/zeronet_data:/app/ZeroNet/data" \
--name acestream-scraper \
visesa84/acestream-scraper-pyacexy:latest
docker run -d \
-p 8040:8040 \
-p 43110:43110 \
-p 43111:43111 \
-e ENABLE_TOR=true \
-v "${PWD}/config:/app/config" \
-v "${PWD}/recordings:/app/config/recordings" \
-v "${PWD}/zeronet_data:/app/ZeroNet/data" \
--name acestream-scraper \
visesa84/acestream-scraper-pyacexy:latest
The application can use Cloudflare WARP to provide enhanced privacy and access to geo-restricted content:
docker run -d \
-p 8040:8040 \
--cap-add NET_ADMIN \
--cap-add SYS_ADMIN \
--device /dev/net/tun:/dev/net/tun \
--sysctl net.ipv4.conf.all.src_valid_mark=1 \
--sysctl net.ipv4.ip_forward=1 \
-e ENABLE_WARP=true \
-v "${PWD}/config:/app/config" \
-v "${PWD}/recordings:/app/config/recordings" \
--name acestream-scraper \
visesa84/acestream-scraper-pyacexy:latest
Note: WARP integration requires additional capabilities (
NET_ADMINandSYS_ADMIN) to create and manage network tunnels.
Prerequisites:
Setup:
git clone https://github.com/visesa84/acestream-scraper-pyacexy.git
cd acestream-scraper
python3 -m venv venv
source venv/bin/activate # On Windows use: venv\Scripts\activate
pip install -r requirements.txt
Create config and run:
mkdir -p config
# Create config/config.json as shown above
python wsgi.py # For production
Access the web interface at http://localhost:8040

The main dashboard provides:
Get the M3U playlist for your media player:
http://localhost:8040/playlist.m3uhttp://localhost:8040/playlist.m3u?refresh=truehttp://localhost:8040/playlist.m3u?search=sportsTo use in your media player (like VLC):
URL Formatting Note:
{base_url}{channel_id}&pid={local_id} is automatically appended to each stream URL: {base_url}{channel_id}&pid={local_id}The application provides OpenAPI/Swagger documentation:
http://localhost:8040/api/docsIf you enabled PyAcexy (recommended):
http://localhost:8080Configure through the setup wizard or directly in config.json:
urls: Array of URLs to scrape for Acestream channelsbase_url: Base URL format for playlist generation (e.g., acestream:// or http://localhost:6878/ace/getstream?id=)ace_engine_url: URL of your Acestream Engine instance (default: http://127.0.0.1:6878)checkstatus_interval: How often to refresh All Check Status Channel (in hours, default: 24)checkstatus_enabled: Enable or disable Check Status Channels (default: True)FLASK_PORT: Port the Flask application runs on (default: 8040)ENABLE_ACESTREAM_ENGINE: Enable built-in Acestream Engine (default: matches ENABLE_ACEXY)ACESTREAM_HTTP_PORT: Port for Acestream engine (default: 6878)ACESTREAM_HTTP_HOST: Host for Acestream engine (default: uses value of ACEXY_HOST)PyAcexy provides an enhanced proxy interface for Acestream, with a web UI for better management:
ENABLE_ACEXY: Set to true to enable Pyacexy proxy (default: false)ACEXY_LISTEN_ADDR: Address for PyAcexy to listen on (default: :8080)ACEXY_HOST: Hostname of the Acestream Engine to connect to (default: localhost)ACEXY_PORT: Port of the Acestream Engine to connect to (default: 6878)ACEXY_NO_RESPONSE_TIMEOUT: Timeout for Acestream responses (default: 15)ACEXY_BUFFER_SIZE: Buffer size for data transfers (default: 5)Cloudflare WARP provides enhanced privacy and secure tunneling:
ENABLE_WARP: Set to true to enable Cloudflare WARP (default: false)CONTAINER_NETWORK_MODE: Set to host or bridge (default: host)WARP_LICENSE_KEY: Optional license key for WARP+ or WARP TeamENABLE_TOR: Enable TOR for ZeroNet connections (default: false)TZ: Timezone for the container (default: Europe/Madrid)The application verifies if channels are available:
To use this feature:
ace_engine_url to point to your Acestream Engine instance8040: Main web interface (configurable via FLASK_PORT)43110: ZeroNet web interface (if ZeroNet enabled)43111: ZeroNet transport port (if ZeroNet enabled)8080: PyAcexy web interface (if enabled)6878: Acestream HTTP API port (configurable via ACESTREAM_HTTP_PORT)26552: Additional ZeroNet peer portWhen using Docker, mount these volumes:
/app/config: Configuration files/app/recordings: Records files/app/ZeroNet/data: ZeroNet data directory (if using ZeroNet)The application looks for a zeronet.conf file in the /app/config directory. If none exists, it creates one with default values:
[global]
ui_ip = *
ui_host =
0.0.0.0
localhost
ui_port = 43110
To customize ZeroNet access:
config/zeronet.conf:[global]
ui_ip = *
ui_host =
127.0.0.1
your.domain.com
localhost:43110
ui_port = 43110
docker run -d \
-p 8040:8040 \
-p 43110:43110 \
-v "${PWD}/config:/app/config" \
-v "${PWD}/recordings:/app/config/recordings" \
--name acestream-scraper \
visesa84/acestream-scraper-pyacexy:latest
The application includes proper headers handling for running behind a reverse proxy:
ui_host for public accesslocalhost for local accessThe container includes comprehensive health checking:
/health endpoint providing detailed statusThe application follows a service-oriented architecture with:
Contributions are welcome! Please fork the repository and create a pull request with your changes.
Special thanks to the developers of Flask, BeautifulSoup, SQLAlchemy, and other dependencies used in this project.
Content type
Image
Digest
sha256:419d1dbf0…
Size
542.1 MB
Last updated
about 16 hours ago
docker pull visesa84/acestream-scraper-pyacexy