A Python-based web scraper designed to automatically extract and organize components from Tailwind UI. This tool preserves the original site structure and saves React components in a hierarchical folder system.
The scraper creates a hierarchical folder structure:
components/
βββ Marketing/
β βββ Page Sections/
β β βββ Hero Sections/
β β β βββ SimpleHero.jsx
β β β βββ ...
β β βββ ...
β βββ ...
βββ Application UI/
βββ Ecommerce/
git clone <your-repository-url>
cd tailwind-ui-scraper
python -m venv venv
# On Windows
venv\Scripts\activate
# On macOS/Linux
source venv/bin/activate
pip install -r requirements.txt
.env
file in the project root:[email protected]
TAILWIND_UI_PASSWORD=your-password
python components.py
The script will:
tailwind_components_structure.txt
get_component_structure()
: Creates initial site structure mapsave_structure_to_file()
: Saves structure to text filevisit_component_urls()
: Visits each component URLget_component_code()
: Extracts component codelogin()
: Handles Tailwind UI authenticationThe script includes error handling for:
This tool is for educational purposes. Ensure you have proper authorization and comply with Tailwind UI's terms of service when using this scraper.