Checks for common open directories on the server.
Downloads a media file (image or video) and saves it to the local directory.
Extracts the domain from a URL for folder naming purposes.
Extracts all links from an HTML page, normalizing them to absolute URLs.
Fetches and parses the robots.txt file.
Fetches a web page and prints the response status, demonstrating cookie handling.
Normalizes a link to an absolute URL based on the base URL.
Sleeps for a random duration between a given range, mimicking human browsing behavior.
Generates a random user-agent string from a predefined list.
Recursively scrapes web pages starting from the given URL, looking for the target phrase.
If the target phrase is not found in the HTML content of a page, it stops scraping in that direction.
Executes the entire scraping workflow for the provided URL, including:
Scrapes all meaningful content from an HTML page, including text, images, videos, meta tags, and forms.
Scrapes for emails and saves them to a file.
Scrapes for errors and stack traces in the HTML content.
Scrapes JavaScript content for API keys or tokens.
Checks if the given content contains the target phrase.