One incorrect assumption you've made has nothing to do with language nor implementation. URLs include more information than IP addresses do. An IP address is just a destination on a network. A URL also specifies a resource on that machine. Therefore, even if you successfully compile a list of unique URLs, there's every possibility that the list of IP addresses resolved from them will not be unique. Two URLs might be different resources on the same host. Most web sites are even hosted on some sort of shared hosting or virtual hosting environment, so two hostnames that are different even have a chance of being on the same IP address.