(s=>(()=>{let t="https://www.onthisday.com/today/birthdays.php",e=decodeURIComponent(s);if(/^(?:\[?Error|Remote Server Returned Code) /.test(e))return`Failed to access ${t}: ${e}`;let a=e.match(/<span\s[^>]*(?<=\s)class\s*=\s*"[^"]*(?<=\s|")month(?=\s|")[^"]*"[^>]*>\s*([a-z]+)\s*<\/span\s*>\s*<span\s[^>]*(?<=\s)class\s*=\s*"[^"]*(?<=\s|")date(?=\s|")[^"]*"[^>]*>\s*(\d+)\s*<\/span\s*>/i);if(null==a)return`Failed to parse today's date from ${t}: ${e}`;let[,l,r]=a,d=[...e.matchAll(/<li\s[^>]*(?<=\s)class\s*=\s*"[^"]*(?<=\s|")person(?=\s|")[^"]*"[^>]*>((?:.|\s)+?)<\/li\s*>|(<span\s[^>]*(?<=\s)class\s*=\s*"[^"]*(?<=\s|")poi__heading-txt(?=\s|")[^"]*"[^>]*>(?:.|\s)+?<\/p\s*>)/gi)];if(0===d.length)return`Failed to parse any birthdays from ${t}: ${e}`;let n=d[Math.floor(Math.random()*d.length)],[,i,o]=n,p=s=>s.replace(/<[^>]+>/g,""),h=(()=>{let s={amp:"&",lt:"<",gt:">",quot:'"',"#39":"'","#x27":"'","#x60":"`"},t=RegExp(`&(${Object.keys(s).join("|")});`,"g");return e=>e.replace(t,(t,e)=>s[e])})(),u=s=>h(p(s)),m,c,y,f;if(null!=i){let g=u(i),b=g.match(/^\s*(\d+)\s+((?:.|\s)+?)(?:\s*,\s*((?:.|\s)+?)??)?(?:\s*\(\s*d\.\s*(\d+)\s*\))?(?:\s*\[\s*\d+\s*\])*\s*$/i);if(null==b)return`Failed to parse birthday from ${t}: ${g}`;[,c,m,f,y]=b}else{let F=u(o),$=F.match(/^\s*((?:.|\s)+?)\s*\(\s*(\d+)\s*(?:-\s*(\d+)\s*\)\s*((?:.|\s)+?)??|[a-z]+\s+Birthday\s*\)\s*(\d+)(?:\s+((?:.|\s)+?))??)(?:\s*\[\s*\d+\s*\])*\s*$/i);if(null==$)return`Failed to parse birthday from ${t}: ${F}`;let x,w,z,R;[,m,x,y,w,z,R]=$,c=z??x,f=null==z?w:R}return`Famous birthday today, ${l} ${r}: ${m} (${c}–${y??""})${null==f?"":`: ${f}`}`})().substring(0,400))
Non-minified:
((
urlEncodedTodaysFamousBirthdaysHtml
) => (() => {