Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Example of using the NYT URL text-only, no CSS or Javascript, no tracking code

   x="https://www.nytimes.com/2026/05/19/business/google-seach-bar-ai-gemini.html?unlocked_article_code=1.jlA.95yh.ptfBUHf-rBtB&smid=url-share"
   x=https://www.nytimes.com/2026/05/19/business/google-seach-bar-ai-gemini.html

   links -source "$x" \
   |egrep -o "(\"text\":\"[^}]+)|(\"textAlign\":\"LEFT\")|(\"url\":\"[^\"]+)|(\"__typename\":\"TextInline\")" \
   |sed '/\"url\":\"/{s/??.*//;s/$/\">/;s/.\{7\}/<a href=\"/;};
      /\"__typename\":\"TextInline\"/{s/\"$/<\/a>/;s/.\{24\}//;};
      s/\"textAlign\":\"LEFT\"/<p>/g;/\"text\":\"/{s/.\{8\}//;s/\"$//;};
      s/\\u002F/\//g;s/\\u0026/\&/g' \
   |sed '1s/^/<meta charset=utf-8><meta name=viewport content=width=device-width>/' > 1.htm
   links 1.htm
   #firefox ./1.htm

   # firefox view-source:"$x" and "Save as" can be substituted for links -source


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: