Extract domain name from URL with subdomain?

1 view
Skip to first unread message

Brian Armstrong

unread,
Nov 17, 2009, 12:20:56 PM11/17/09
to Typhoeus
Apparently this is tricky to do:
http://stackoverflow.com/questions/983158/remove-subdomain-from-string-in-ruby

Just wondering if Typhoeus has an implementation of this (possibly
using publicsuffix.org or something similar)?

Paul Dix

unread,
Dec 11, 2009, 1:04:17 PM12/11/09
to typh...@googlegroups.com
Hey Brian,
I just wrote something up real quick to do exactly this.

Have a look at it here:
http://github.com/pauldix/domainatrix

Best,
Paul
> --~--~---------~--~----~------------~-------~--~----~
> You received this message because you are subscribed to the Google Groups "Typhoeus" group.
> To post to this group, send email to typh...@googlegroups.com
> To unsubscribe from this group, send email to typhoeus+u...@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/typhoeus?hl=en
> -~----------~----~----~----~------~----~------~--~---
>
>
Reply all
Reply to author
Forward
0 new messages