Scripts pour scraper des templates Webflow et les rebrander rapidement en sites statiques déployables sur Cloudflare Pages.
Utilisé pour construire :
- MEGGA Shield (megga.dev) — depuis QuantumLab template
- Design Home Geneva (megga.io) — depuis Archipro template
- Four Seasons Group (fourseasonsgroup.ch) — depuis Architectr template
- Juarts (juarts.pages.dev) — depuis Subscriptions template
- MEGGA.ai marketing (WIP) — depuis CodeAI X template
- Rove Pictures (WIP) — depuis CinemaFlow template
git clone https://github.com/studiobloom/reflow.git ~/Desktop/site-clones/Reflow
cd ~/Desktop/site-clones/Reflow
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txtcd ~/Desktop/site-clones/Reflow
source .venv/bin/activate
python reflow.py https://<TEMPLATE>.webflow.io --output ~/Desktop/site-clones/<PROJECT>-reflow --no-zip --quietLe scrape conserve :
- ✅ Tous les HTML/CSS/JS
- ✅ Toutes les images (svg/jpg/png/lottie)
- ✅ Animations Webflow IX2 (via
data-w-id+webflow.X.jsruntime) - ✅ Toutes les pages liées (3 homes V1/V2/V3, 3 blogs, etc.)
mkdir -p ~/Desktop/site-clones/<PROJECT>-static
cp -r <PROJECT>-reflow/images <PROJECT>-static/
cp -r <PROJECT>-reflow/js <PROJECT>-static/
# Copier les pages sélectionnées (home V2, pricing V3, etc.)
cp <PROJECT>-reflow/home-pages/home-v2.html <PROJECT>-static/index.html
# ... etc# Adapter un script existant (rebuild-juarts.py, rebuild-dhg.py, etc.) au nouveau projet
python scripts/<project>/rebuild-<project>.py
python scripts/<project>/fix-<project>-paths.py
python scripts/<project>/audit-<project>.py# Première fois — créer le projet CF
npx wrangler pages project create <PROJECT> --production-branch=main
# Deploy
cd ~/Desktop/site-clones/<PROJECT>-static
npx wrangler pages deploy . --project-name=<PROJECT> --commit-dirty=truecd ~/Desktop/site-clones/<PROJECT>-static
git init
git add .
git -c user.email="hello@<project>.com" -c user.name="Megga" commit -m "Initial commit"
gh repo create megga/<PROJECT> --private
git remote add origin https://github.com/megga/<PROJECT>.git
git branch -M main
git push -u origin mainChaque projet a 3 scripts custom (parfois 2 si simple) :
| Script | Rôle |
|---|---|
rebuild-<project>.py |
Text rebrand (CodeAI→Brand), logo, footer, badges Webflow/BRIX retirés, scripts injectés (badge-remover, same-page-scroll) |
fix-<project>-paths.py |
Corrige les paths relatifs après restructure (depth 1 vs depth 2) + remap des liens cassés vers les pages copiées |
audit-<project>.py |
Vérifie résidus (Webflow/BRIX), brand consistency, refs cassées, injections présentes, runtime IX2 chargé |
Pattern à dupliquer pour un nouveau projet :
- Copier
scripts/juarts/→scripts/<nouveau>/ - Rename
juarts→<nouveau>dans les fichiers - Adapter les
TEXT_REPLACEMENTS(brand source → brand cible) - Adapter les
LINK_REMAPSselon les pages copiées
TEXT_REPLACEMENTS = [
# Longest patterns first
(r"OldBrand X Webflow Template", "NewBrand"),
(r"\bOldBrand\b", "NewBrand"),
# Emails
(r"@oldbrand\.com\b", "@newbrand.com"),
# Generic Webflow markers (clean these always)
(r" - Webflow HTML website template", ""),
(r" - Webflow Ecommerce website template", ""),
(r" Webflow Template", ""),
# ...
]LINK_REMAPS = [
# Old structure → new
(r"home-pages/home-v[123]\.html", "index.html"),
(r"company-pages/about\.html", "about.html"),
# ...
# Webflow Commerce cart placeholders (harmless but ugly)
(r'src="(?:\.\./)?images/[a-z0-9-]+\.html"', 'src=""'),
]if depth == 1:
# Strip ../ prefix from asset refs at root
re.sub(r'(["\'])\.\./(js|images|assets|css)/', r'\1\2/', text)
elif depth == 2:
# Add ../ prefix to root assets for subfolder pages
re.sub(r'(href|src)="(js|images|assets|css)/', r'\1="../\2/', text)⚠️ Ne JAMAIS toucher au runtimewebflow.X.js— c'est ce qui fait fonctionner les animations IX2. Si tu casses la structure, les animations meurent.⚠️ Les data-w-id sur les éléments = clé d'animation Webflow. Si tu modifies un élément animé, garde sondata-w-id.- ✅ Tu peux changer librement : texte, images src, classes CSS additionnelles, contenu enfant des éléments
- ✅ Cloudflare projet séparé par site — déploiement via
wrangler(PAS git-connected sauf cas particuliers) - ✅ Repos GitHub privés pour chaque projet — sauvegarde + collab
| Projet | Folder | Cloudflare | GitHub |
|---|---|---|---|
| MEGGA Shield | megga-shield-static/ |
megga-dev |
thomastaillefer/megga |
| Design Home Geneva | designhomegeneva-static/ |
megga-io |
megga/dhg |
| Four Seasons Group | fourseasonsgroup-static/ |
fourseasonsgroup |
megga/fourseasonsgroup |
| Juarts | juarts-static/ |
juarts |
megga/juarts |
| MEGGA.ai marketing | meggaai-static/ |
(WIP) | (à push) |
| Rove Pictures | cinemaflow-reflow/ |
(WIP) | megga/rovepictures |