4 ms·
Think so. Or has it got anything to do with the #?
by kvprashant 13y ago
Think so. Or has it got anything to do with the #?
- lifthrasiir 13y agoLooking at news.arc in the Arc distribution (I think that is a source code of the HN or at least a basis of it, right?), it just misses this kind of URLs: (def parse-site (url) (rev (tokens (cadr (tokens url [in _ #\/ #\?])) #\.))) It basically tokenizes the URL "http://example.com/foo/bar?quux#woah" http://example.com/foo/bar?quux#woah" into a list "http:", "example.com", "foo", etc. (no "" since tokens uses consif internally) and takes the second element as a domain name. (It has a prior knowledge of url starting with either "http://" http://" or "https://". https://".) Obviously "#" is missing in the list of separators. Edit: I filed an issue to the HN issue tracker. https://github.com/HackerNews/HN/issues/35 https://github.com/HackerNews/HN/issues/35