BestPromptFinder
HomeCoding › Below is an instruction that describes a task. Write a respo...

Below is an instruction that describes a task. Write a respo...

Coding · Gemini, GPT-5.6, Claude · Coding
55Quality
87%Useful
85Reliability

The prompt

Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Create a web crawler in Python that starts from a website and looks for other links in the page then scrapes the page content. ### Input: Not applicable ### Output: import requests from bs4 import BeautifulSoup import re def crawl(url): visited = set() queue = [url] while queue: curr = queue.pop(0) visited.add(curr) response = requests.get(curr) if response.ok: soup = BeautifulSoup(response.text, 'html.parser') # scrape the page here # find all the links links = soup.find_all('a', href=re.compile('^http')) for link in links: if link['href'] not in visited: queue.append(link['href'])
Find similar in the app →

Why this prompt

Source

Hugging Face

Related Coding prompts

PRD to MVP Technical Plan
Quality 93 · Claude Code
Full-Stack CRUD App Builder
Quality 93 · Claude Code
Legacy Refactor Planner
Quality 93 · Claude Code
Test Suite Generator
Quality 93 · Claude Code
Third-Party API Integration
Quality 93 · Claude Code
Database Schema and Migration
Quality 93 · Claude Code