Skip to main content

4 posts tagged with "web-scraping"

web-scraping tag description

View All Tags

Detect Google AdSense on "Tough" Sites with Playwright

· 5 min read
Serhii Hrekov
software engineer, creator, artist, programmer, projects founder

When standard requests scripts fail with a 403 Forbidden or a Cloudflare "Verify you are human" challenge, it's usually because the website is looking for real browser behavior (like rendering JavaScript or moving a mouse).

Playwright is a modern browser automation library that acts like a real human using Chrome, Firefox, or Safari. It can bypass simple bot detection and see exactly what a user sees, making it the ultimate tool for AdSense detection on "tough" sites.

How to Detect Google AdSense on a Website with Python

· 5 min read
Serhii Hrekov
software engineer, creator, artist, programmer, projects founder

Detecting whether a website is running Google AdSense is a common task for digital marketers, SEO researchers, and competitive analysts. From a technical perspective, AdSense works by injecting a specific JavaScript library into the page, usually accompanied by a unique "Publisher ID" (formatted as pub-xxxxxxxxxxxxxxxx).

In Python, we can identify these markers by "scraping" the HTML and searching for the signature AdSense scripts.

How to Download YouTube Thumbnails in Python (Without Pytube)

· 5 min read
Serhii Hrekov
software engineer, creator, artist, programmer, projects founder

Downloading a YouTube thumbnail is a classic Python task that involves two main steps: extracting the unique Video ID from a URL and then fetching the image from Google's thumbnail servers.

Because YouTube uses a predictable URL structure for its images, you don't actually need the heavy pytube library just to get the thumbnail-standard requests will do the trick!

Get Youtube Video Metadata with Python (yt-dlp)

· 5 min read
Serhii Hrekov
software engineer, creator, artist, programmer, projects founder

While simply grabbing a thumbnail only requires a basic URL trick, accessing a video's metadata-like its title, view count, and description-requires a tool that can "scrape" or "query" the actual page data.

In the Python world, the gold standard for this is yt-dlp. It is a faster, more frequently updated successor to the original youtube-dl. Unlike the official Google API, yt-dlp doesn't require an API key or complex project setup, making it perfect for quick scripts.