Crawlers Counted as Video Plays: Filtering Bots From a View Counter (and the Phone Called Cubot)
One morning a single site in our API stats showed 48,512 plays for the previous day. The site had about 20 human visitors. Every other "play" came from one AI crawler reading the site page by page. This post is about why that happens and how to filter it without losing real viewers.
Why a player counts crawlers
An embedded player is its own page inside an iframe. Crawlers that render pages, or simply follow iframe sources, request it like any other resource. If the player records a play when it loads, each crawler visit to each video page becomes a play. Older crawlers rarely did this. AI crawlers fetch whole sites, often more than once a day, and load everything.
A filter that works
We check the user agent before recording a play:
_CRAWLER_UA = re.compile(
r'bot[/;_+-]|crawl|spider|slurp|headless|lighthouse|preview|facebookexternalhit|'
r'bytespider|petalbot|python|curl|wget|scrapy|phantomjs|puppeteer|playwright|^$', re.I)
if not _CRAWLER_UA.search(request.META.get('HTTP_USER_AGENT', '')):
record_play(key, domain)
The player still loads for crawlers. Only the counting is skipped. Blocking crawlers would also stop them indexing the pages that embed you, which costs your users traffic.
The false positive: Cubot
Our first version used bot\b: "bot" at the end of a word. It caught Googlebot and GPTBot. It also caught Cubot, a phone brand whose user agent contains "Cubot" followed by a space. Real people on those phones stopped being counted.
Crawler names are written as a product token, so "bot" is followed by a slash, a semicolon or similar: Googlebot/2.1, GPTBot/1.0, bingbot/2.0;. Matching bot[/;_+-] catches those and leaves "Cubot X50" alone.
Before deploying any user-agent rule, run it over a day of real log lines and look at what it matches. A rule that only ever sees crawler test strings will not show you the phone it is about to hide.
Other things that inflate plays
- Your own monitoring. An uptime probe that loads the player every minute adds 1,440 "plays" a day.
- Headless browsers used for screenshots, link previews and SEO tools. Most announce themselves with "Headless" or "Lighthouse".
- Empty user agents. Real browsers always send one; scripts often do not.
Frequently asked questions
Can't a bot just pretend to be a browser?
Yes. A user-agent filter removes honest crawlers, which are the vast majority of the volume. For the rest, look at patterns in the logs, such as one IP producing most of a site's plays.
Should play counts and ad impressions match?
No. Ad networks apply their own bot filtering. After filtering crawlers, your plays should be much closer to them.
Does the API count crawler plays?
Not since 15 November 2026. Historic numbers before that date include them.
Related: finding every site that embeds your player · porn API developer guide
Want a WordPress tube site that fills itself with tagged, categorized video — free?
Get your API key →