Booking.com detects headless Chromium via TLS ClientHello fingerprint (JA3) and immediately flags the residential proxy IP on first contact. Firefox has a different TLS fingerprint and GREASE extensions that aren't yet flagged. Image blocking via Firefox preference (permissions.default.image=2) replaces the Chrome --blink-settings flag. Dockerfile updated to install both browsers. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
25 lines
539 B
Docker
25 lines
539 B
Docker
FROM python:3.11-slim
|
|
|
|
WORKDIR /app
|
|
|
|
RUN apt-get update && apt-get install -y \
|
|
build-essential \
|
|
libpq-dev \
|
|
postgresql-client \
|
|
curl \
|
|
xvfb \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
COPY requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
# Playwright + Chromium for Booking.com scraper
|
|
RUN playwright install chromium firefox --with-deps
|
|
|
|
COPY . .
|
|
|
|
EXPOSE 8000
|
|
|
|
ENV DISPLAY=:99
|
|
|
|
CMD ["sh", "-c", "Xvfb :99 -screen 0 1280x720x24 -nolisten tcp & sleep 1 && uvicorn main:app --host 0.0.0.0 --port 8000"]
|