3 ms·
I am wondering what code could have this effect. Off topic: I just signed up for FeedFlix. Looks really cool! Great job! (update: submitted it to yc news)
by kirubakaran 19y ago
I am wondering what code could have this effect.
Off topic: I just signed up for FeedFlix. Looks really cool! Great job! (update: submitted it to yc news)
- raghus 19y agoActually, someone suggested I look at the source code rather than submit a ton of URLs and try to reverse-engineer the logic by looking at the results. Here's the relevant code fron news.arc: (defmemo sitename (url) (let toks (parse-site url) (if (isa (saferead (car toks)) 'int) (tostring (prall toks "" ".")) (let (t1 t2 t3 . rest) toks (if (or (mem t1 multi-tld-countries) (and t3 (mem t2 long-domains))) (string t3 "." t2 "." t1) (string t2 "." t1)))))) ; Minor bug: can have both google.at and google.co.at. Same for jp. (= multi-tld-countries* '("uk" "jp" "au" "in" "ph" "tr" "za" "my" "nz" "br" "mx" "th" "sg" "id" "pk" "eg" "il" "at")) (= long-domains* '("blogspot" "wordpress" "livejournal" "blogs" "typepad" "weebly" "blog-city" "com"))
- kirubakaran 19y agoThanks. I was being lazy too :)