Hacker News new | ask | show | jobs
by blahgeek 6 days ago
Reminds me of an anti-crawl mechanism I encountered some time ago in a financial data provider's website: for all numbers in the table, a special font is used where 0~9 are randomly rendered as different chars (e.g. '0' is rendered as 5, '1' is rendered as 8, etc.). The backend server returns the "encoded" chars, and is then correctly "decoded" by the font. The font changes after each reload. So humans always see the correct numbers, but when some crawler uses the HTML source, the numbers are incorrect.
1 comments

How would a human copying/pasting a number work?
In my experience (PDF contract sent by a house seller), copy paste was broken.

That said, after 15 minutes of gently massaging the PDF with claude, it was pretty easy to drop the substitutions and restore the original text.

The proper way would be to set "user-select: none;" to prevent the user from copying. Annoying, but better than copying wrong info