SShortSingh.
Back to feed

Why Python email scrapers miss addresses: Cloudflare encoding, obfuscated text and HTML entities

0
·6 views

A common regex-based email scraper fails to find many visible addresses and also picks up non-email strings such as image filenames. The article explains that Cloudflare's Email Address Obfuscation hides addresses in the downloaded HTML, and that a simple XOR scheme, where the first byte is a key, can decode them. It also notes that HTML entities and URL-encoded mailto links require decoding before searching. For addresses written out to evade bots, such as 'info [at] acme [dot] com', the author provides regex patterns to reconstruct them. Finally, filters are suggested to remove junk matches like placeholder domains, no-reply addresses and hash-like strings.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Developer builds random video chat with WebRTC, Socket.IO and Redis, and shares production bugs

A developer describes building Chaface, a free 18+ random video chat service that runs in browsers and on Android. The architecture uses React and TypeScript on the frontend, Node.js with Socket.IO for signaling, Redis for matching queues, and PostgreSQL for storage. Video and audio flow directly between users when possible, with a self-hosted TURN server relaying media only when needed. The author explains that matching works through Redis lists, and that country filters could leave small user bases in empty queues, which was fixed with a priority cascade. The post focuses on real-world lessons such as avoiding fallback logic that skips people who are waiting.

0
ProgrammingDEV Community ·

Diagnosing Corrupted Marketplace Archive Downloads Caused by Multipart Upload Gaps

A corrupted ZIP download can be traced back through the upload manifest to determine whether the stored object is complete. The recommended approach is to compare the file's length against the source export, then check the download response, the published object, the completion record, and the numbered parts in turn. Upload sessions and catalog records should stay separate, with download links issued only after completion and verification succeed. Parallel uploads require completion to sort parts by their assigned numbers, and retries should reuse part numbers and consult persisted manifests to avoid ambiguous objects. Download responses also need an intentional cache policy suited to private content.

0
ProgrammingHacker News ·

Hobbyist Reports Year-Long Factory Tinkering Has Finally Paid Off With Smooth Operation

A post on Hacker News links to a tweet by Steve Yegge describing a factory that has finally begun running smoothly after roughly a year of adjustments. The shared material is brief, consisting only of the linked social media post and a small amount of discussion. The source does not provide detailed specifics about the factory's products, scale, or the nature of the changes made. It also gives no quantitative measures of the improvement or the methods used to achieve it. The item attracted modest attention on the platform, with a few points and one comment recorded.

0
ProgrammingDEV Community ·

Why Apps Run Out of Database Connections and How Connection Pooling Fixes It

Apps that open a new database connection for every request can hit server limits like PostgreSQL's max_connections, causing errors and timeouts even when queries are fast. Each connection carries handshake, authentication, and memory costs on the server, so opening them per request adds latency and exhausts capacity under load. A connection pool keeps a set of open connections and lends them out, capping the total count and amortizing setup costs. The total connection load grows with every instance and process, so autoscaling can quickly exceed limits even when each pool looks modest. Simply enlarging pools often backfires, since a database has finite CPU and I/O that concurrent queries must share.