- Clone the repository
- Install dependencies:
npm install
- Install shadcn/ui components:
npx shadcn-ui@latest init
- Add required components:
npx shadcn-ui@latest add button input card
- Server-side YouTube playlist scraping using Crawlee
- Client-side playlist data visualization
- Responsive design using Tailwind CSS
app/page.jsx: Main component with UI and client-side logicapp/api/scrape-playlist/route.ts: API route for playlist scraping
To prevent Crawlee from caching requests, we use a UUID for each scraping operation:
- Generate a UUID for each request
- Use the UUID in the Crawlee request's
uniqueKey - Include the UUID in the dataset name
This ensures that each scraping operation is treated as unique, even for the same playlist URL.
- The app requires a server environment capable of running Playwright for scraping.
- Ensure you have the necessary dependencies installed (
crawlee,uuid). - The scraping process may take some time for large playlists.
- Be mindful of YouTube's terms of service when using this app.
- The app uses shadcn/ui components, which are built on top of Tailwind CSS. Make sure Tailwind is properly configured in your project.
Run the development server:
npm run devOpen http://localhost:3001 in your browser.