 
 	func shouldDownloadFaviconURL(_ faviconURL: String) -> Bool {
 
-		return !urlsBeingDownloaded.contains(faviconURL)
+		return !urlsBeingDownloaded.contains(faviconURL) && !badURLs.contains(faviconURL)
 	}
 
-	func downloadFavicon(_ faviconURL: String) {
+	func downloadFavicon(_ faviconURL: String, _ homePageURL: String) {
 
 		guard let url = URL(string: faviconURL) else {
 			return

	private var faviconURLCache = ThreadSafeCache<String>() // homePageURL: faviconURL
	private let folder: String
	private var urlsBeingDownloaded = Set<String>()
	private let binaryCache: RSBinaryCache
	private var badImages = Set<String>() // keys for images on disk that NSImage can’t handle
	private let queue: DispatchQueue


		assert(Thread.isMainThread)

		guard let homePageURL = feed.homePageURL else {
			return nil
		}

		if let faviconURL = faviconURL(for: feed) {

			if let cachedFavicon = cache[faviconURL] {
				return cachedFavicon
			}

			// TODO: read from disk and return if present.

			if shouldDownloadFaviconURL(faviconURL) {
				downloadFavicon(faviconURL, homePageURL)
				return nil
			}

			return nil
		}

		// Try to find the faviconURL. It might be in the web page.
		FaviconURLFinder.findFaviconURL(homePageURL) { (faviconURL) in

			if let faviconURL = faviconURL {
				print(faviconURL) // cache it; then download favicon
			}
			else {
				// Try appending /favicon.ico
				// It often works.
			}
		}

