Urgent.News

What's breaking now, across thousands of outlets.

Tech

Does this URL pass Core Web Vitals? Check CrUX field data in Python, with an honest origin fallback

PageSpeed Insights answers "does this one URL pass Core Web Vitals?" well. It answers badly when you have 300 URLs, a template you want to compare, or a weekly report to produce. The CrUX API is the source of that field data, and it is small enough to call from a short script with no dependencies. The catch is that a few details of the response are easy to get wrong, and one of them silently…

Core Web Vitals can be evaluated using the CrUX API through a Python script. This API provides real-user data from Chrome, aggregated over a 28-day window and refreshed daily. For each metric, you receive a histogram and a 75th percentile value. A page passes a Core Web Vital when its 75th percentile value falls within the "good" range.

The script handles several traps, such as CLS being a string, a 404 response being normal, falling back to origin changes the meaning, and a missing metric not being a pass. To use the script, save it as crux_cwv.py, provide an API key, and run it with a list of URLs and an output CSV file. The script supports checking the page speed performance on different devices, such as PHONE, DESKTOP, or TABLET, and generates a report indicating whether each URL passes the Core Web Vitals.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

RACE CONDITION

𝐒𝐨𝐟𝐢𝐚 𝐢𝐬 𝐢𝐧 𝐌𝐚𝐝𝐫𝐢𝐝. 𝐉𝐚𝐦𝐞𝐬 𝐢𝐬 𝐢𝐧 𝐓𝐨𝐫𝐨𝐧𝐭𝐨. Both find the same small hotel in Lisbon for the same weekend.

My GitHub trending site lost 84% of its Google traffic in one day. Here's what I got wrong.

Quick context I'm a solo dev in Abidjan. On October 13 I launched Upstar , a site that ranks the GitHub repos taking off inside each topic: self-hosted, Rust, local LLMs, Android, agent skills, 69…

  • My GitHub trending site lost 84% of Google traffic in one day on October 23.
  • Googlebot fetched only 1,650 pages instead of usual 16,500 due to duplicate content.
  • Removing duplicates and updating indexing rules restored some traffic, but full recovery uncertain.

Turn a Student Coding Project into a Portfolio Someone Else Can Understand

A practical documentation workflow for developers preparing for college applications. A working demo answers one question: does the software do something?

  • Transform coding project into understandable portfolio for college applications
  • Create concise README explaining purpose, usefulness, and setup instructions
  • Maintain decision log to capture key development choices and lessons learned

More from Thursday 29 October →