Posts

Showing posts from February, 2026

Practical Web Scraping with Python: A Clean, Safe Pattern for Pulling Company Names & Emails

Image
Practical Web Scraping with Python: A Clean, Safe Pattern for Pulling Company Names & Emails Turn that quick-and-dirty script into a reliable tool you won’t be afraid to run twice. Meta description suggestion: Learn a production-friendly pattern for scraping company names and emails with Python, Requests, and BeautifulSoup—featuring retries, timeouts, robots.txt checks, pagination, and CSV export. On this page The problem The cleaned, safe solution Copy-paste code How it works How to run it Practical use cases Pitfalls & guardrails Variations & alternatives What to try next The problem You’ve got a page of companies and you want the name and email for each one. The “first pass” script might work on your machine, but it’s brittle: no retries, no timeouts, no robots.txt check, and it assumes every email is a mailto: link. The cleaned, safe ...

Python CSV cleaner

Build a simple CSV cleaner web app with Streamlit + Pandas Meta description suggestion: Turn a small Pandas cleaning script into a Streamlit web app: upload any CSV, remove empty rows and duplicates, preview the result, and download a cleaned file in seconds. Why I built this CSV files are everywhere. They’re also a little chaotic on a good day. You’ll open one and find blank rows, repeated records, odd spacing, or columns that look fine until your import tool refuses them. I wanted a tiny “do the obvious cleanup” button that works for any CSV: upload → clean → preview → download. No hunting for the right Excel filter, no redoing the same steps every week. What this app does The app gives you a few practical cleaning options that cover the most common CSV headaches: Remove empty rows (rows where every value is blank) Remove duplicate rows (or duplicates based on...

A Quick Python Script to Extract Emails From a Web Page

A Quick Python Script to Extract Emails From a Web Page Sometimes you land on a website and think: I know there’s a contact email here somewhere… but it’s buried in a footer, hidden on an “About” page, or lost in a long block of text. If you do research, vendor reviews, outreach, or you’re just trying to save time, copying and pasting around a page gets old fast. This short Python script automates that step. You give it a URL, it downloads the page, pulls out the readable text, then returns any email addresses it finds. What the script does At a high level, it does four things: Fetches the page using requests Parses the HTML and extracts visible body text using selectolax Searches for email patterns with a regular expression (regex) Removes duplicates so you get a clean list of unique results The output is a simple list like: ['info@company.com', 'support@company.com'] Why this is useful This is a small script, but it solves a...

List Saved Wi-Fi Profiles on Windows Using Python

List Saved Wi-Fi Profiles on Windows Using Python (Safe Audit Script) If you use a Windows laptop for work and personal networks, it collects a list of saved Wi-Fi profiles over time. Sometimes you just want to audit what’s stored on your machine (for cleanup, troubleshooting, or basic hygiene). This mini Python script does exactly that: it lists saved Wi-Fi profile names (SSIDs) without exposing passwords. Why this is useful Cleanup: spot old networks you don’t use anymore. Troubleshooting: confirm whether a Wi-Fi profile is saved before re-adding it. Security hygiene: review saved networks on shared or travel devices. Important note You’ll find scripts online that dump saved Wi-Fi passwords. That’s risky and easy to abuse. This version is intentionally safer: it only lists profile names. If you forgot a Wi-Fi password, the best option is to check the router label/admin page or ask the network owner/admin. Script import subprocess from dataclasses import data...