To find favicons you are probably best of to generate the data yourself. For example, check out the package favicon.
Here's a custom python script to download all available favicons from the list, taking only the largest per site, and save them to the folder tmp/
import requests, favicon
r = requests.get('https://raw.githubusercontent.com/opendns/public-domain-lists/master/opendns-top-domains.txt')
for url in r.text.split('\n'):
try:
icon = favicon.get('http://'+url)[0]
response = requests.get(icon.url, stream=True)
with open('tmp/favicon.'+url.replace('.','_')+'.{}'.format(icon.format), 'wb') as image:
for chunk in response.iter_content(1024):
image.write(chunk)
print ('valid:',url)
except:
print ('invalid:',url)
Note: many of the domains in the list aren't valid, for whatever reason
Finding subdomains is much harder, because domains can have infinite subdomains that are not indexed. Some websites offer a subdomain scan, but the results are said to be low quality (see this discussion).
You can try the python package dnscan, which includes a list of 10k likely subdomains to scan for.
/favicon.ico
to a domain name yields its favicon. An insane suggestion: look at commoncrawl.org (I can help w/ this, ping me [contact info in profile] if you need help doing this)