Get the favicon for the current feed

@deprecated Use your own favicon handling instead
483629
public function get_favicon()
	{
		$level = defined('E_USER_DEPRECATED') ? E_USER_DEPRECATED : E_USER_WARNING;
		trigger_error('Favicon handling has been removed, please use your own handling', $level);

		if (($url = $this->get_link()) !== null)
		{
			return 'http://g.etfv.co/' . urlencode($url);
		}

		return false;
	}
723589
function getLinefeed(options) {
  var feeds = {
    cr: '\r',
    crlf: '\r\n',
    lf: '\n',
    lfcr: '\n\r'
  };

  return feeds[options.linefeed] || '\n';
}
599919
function Favicon_readFile() {
        var path = di.normalizePath(this.config.path);
        logger.info('Favicon.readFile:', {
            path: path
        });
        try {
            this.file = fs.readFileSync(path, {encoding: null});
        } catch (e) {
            throw new error.HttpError(500, {}, 'Cannot load favicon', e);
        }

    }
452849
public function icon() {
		$url = $this->_stub['website'];
		if (!$url) {
			return null;
		}

		$pieces = parse_url($url);
		$url = $pieces['host'];

		$icon = 'http://www.google.com/s2/favicons?domain=';
		$icon .= $url;

		$context = stream_context_create(
			['http' => ['header' => 'Connection: close']]);
		// E.g. http://www.google.com/s2/favicons?domain=xyz.com
		$file = file_get_contents($icon, false, $context);
		if ($file === false) {
			return null;
		}
		// TODO: transform into 16x16 png
		return $file;
	}
1319952
function favicoIntegration(options = defaultFavicoOptions) {
  // Create a new Favico integration.
  // Initially this was going to be a singleton object, but I realized there
  // may be cases where you want several different types of notifications.
  // The middleware does not yet support multiple instances, but it should
  // be easy to add if there's demand :)
  //
  // Not using the constructor pattern, because it obfuscates JS' prototypal
  // nature, and there's no need for inheritance here, so this is equivalent.
  const favico = new Favico(options);

  return {
    currentVal: 0,

    update(value, callback) {
      if ( typeof value === 'number' ) {
        // Don't allow non-integer values
        if ( value % 1 !== 0 ) {
          return callback(`
            Warning: Favico not affected.
            You provided a floating-point value: ${value}.
            You need to provide an integer, or a keyword value.

            See https://github.com/joshwcomeau/redux-favicon#troubleshooting for more information.
          `);
        }

        this.currentVal = value;

      } else if ( typeof value === 'string' ) {
        switch ( value.toLowerCase() ) {
          case 'increment': this.currentVal++; break;
          case 'decrement': this.currentVal--; break;
          case 'reset':     this.currentVal=0; break;
          default:
            return callback(`
              Warning: Favico not affected.
              You provided a string value: ${value}.
              The only strings we accept are: ${favicoEnumValues.join(', ')}.

              See https://github.com/joshwcomeau/redux-favicon#troubleshooting for more information.
            `);
        }

      } else {
        // Annoyingly, istanbul won't give me 100% coverage unless all possible
        // typeof values are checked. It is not possible for all types to make
        // it to this check; `undefined` aborts earlier.
        /* istanbul ignore next */
        const provided_type = typeof value;

        return callback(`
          Warning: Favico provided an illegal type.
          You provided a a value of type: ${provided_type}.
          We only accept integers or strings.

          See https://github.com/joshwcomeau/redux-favicon#troubleshooting for more information.
        `);
      }

      // Don't allow negative numbers
      this.currentVal = ( this.currentVal < 0 ) ? 0 : this.currentVal;

      // Set the 'badge' to be our derived value.
      // The favico.js library will show it if it's truthy, hide it if falsy.
      favico.badge(this.currentVal);

      return callback();
    }
  };
}
1214300
def get_feed(feed_uri)
      get_contents_except_resources(feed_uri) do |res|
        #warn "Bad Content Type" unless Atom::MediaType::FEED.is_a?(@res['Content-Type'])
        @rc = Atom::Feed.new :stream => res.body
      end
      @rc
    end
642877
def link_empty_favicon_fallback(self):
        """"""
        self.favicon_fallback = os.path.join(
            os.path.dirname(__file__), 'favicon.ico')
919474
public function feed_or_html()
	{
		$len = strlen($this->file->body);
		$pos = strspn($this->file->body, "\x09\x0A\x0D\x20\xEF\xBB\xBF");

		while ($pos < $len)
		{
			switch ($this->file->body[$pos])
			{
				case "\x09":
				case "\x0A":
				case "\x0D":
				case "\x20":
					$pos += strspn($this->file->body, "\x09\x0A\x0D\x20", $pos);
					continue 2;

				case '<':
					$pos++;
					break;

				default:
					return 'text/html';
			}

			if (substr($this->file->body, $pos, 3) === '!--')
			{
				$pos += 3;
				if ($pos < $len && ($pos = strpos($this->file->body, '-->', $pos)) !== false)
				{
					$pos += 3;
				}
				else
				{
					return 'text/html';
				}
			}
			elseif (substr($this->file->body, $pos, 1) === '!')
			{
				if ($pos < $len && ($pos = strpos($this->file->body, '>', $pos)) !== false)
				{
					$pos++;
				}
				else
				{
					return 'text/html';
				}
			}
			elseif (substr($this->file->body, $pos, 1) === '?')
			{
				if ($pos < $len && ($pos = strpos($this->file->body, '?>', $pos)) !== false)
				{
					$pos += 2;
				}
				else
				{
					return 'text/html';
				}
			}
			elseif (substr($this->file->body, $pos, 3) === 'rss'
				|| substr($this->file->body, $pos, 7) === 'rdf:RDF')
			{
				return 'application/rss+xml';
			}
			elseif (substr($this->file->body, $pos, 4) === 'feed')
			{
				return 'application/atom+xml';
			}
			else
			{
				return 'text/html';
			}
		}

		return 'text/html';
	}
1283963
public function faviconLinkTag($source = null, $attributes = [])
    {
        // E.g. favicon_link_tag('favicon.ico', ['rel' => 'shortcut icon']); =>
        //      <link href='http://localhost/assets/favicon.ico' rel="shortcut icon" type="image/vnd.microsoft.icon">
        $source = $source ?: "favicon.ico";

        $assetsOptions = ['host' => array_pull($attributes, 'host', $this->assetsHost)];

        $defaults = ['rel' => 'shortcut icon', 'type' => 'image/vnd.microsoft.icon'];
        $attributes = $attributes + $defaults;

        return "<link href='".$this->assetPath($source, $assetsOptions)."'".app('html')->attributes($attributes).">".PHP_EOL;
    }
1156512
public function getIconUrl()
    {
        // icon url must be (re)loaded in case icon is not set or shop was switched between ssl/nonssl
        if ($this->_sIconUrl === null || $this->_blSsl != \OxidEsales\Eshop\Core\Registry::getConfig()->isSsl()) {
            $this->_sIconUrl = $this->getArticle()->getIconUrl();
        }

        return $this->_sIconUrl;
    }
776739
public function getNodeIconURL()
    {
        $sURL = null;
        /** @var $oNode TdbShopCategory */
        $oNode = $this->getNodeCopy();
        $oImage = $oNode->GetImage(0, 'navi_icon_cms_media_id', $this->dummyImagesAllowed());
        if ($oImage) {
            $sURL = $oImage->GetRelativeURL();
            $this->sNavigationIconId = $oImage->id;
        }

        return $sURL;
    }
561330
def extract_favicon(bs4):
    

    favicon = []

    selectors = [
        'link[rel="icon"]',
        'link[rel="Icon"]',
        'link[rel="ICON"]',
        'link[rel^="shortcut"]',
        'link[rel^="Shortcut"]',
        'link[rel^="SHORTCUT"]'
    ]

    for selector in selectors:

        icons = bs4.select(selector)

        if icons:

            for icon in icons:

                if icon.has_attr('href'):

                    favicon.append(icon['href'])

    return favicon
1282080
public function getIcon()
    {
        $classNamespaces = explode("\\", static::class);
        $shortClass = end($classNamespaces);

        $resource = ModuleLoader::getModule('silverstripe/userforms')
            ->getResource('images/' . strtolower($shortClass) . '.png');

        if (!$resource->exists()) {
            return '';
        }

        return $resource->getURL();
    }
605764
@Deprecated
    private BufferedImage getImage(String suffix) throws IOException {
        StringBuffer buffer = getBaseImageUrl();
        buffer.append(suffix);
        return _getImage(buffer.toString());
    }
393803
public function faviconAction($host)
    {
        $response = new Response();
        $response->headers->set('Content-Type', Downloader::FAVICON_MIME);

        $filename = $this->get('anime_db.downloader')->favicon($host);

        return $response->setContent(file_get_contents($filename));
    }
657861
def get_fn_link(ft)->str:
    ""
    ft = getattr(ft, '__func__', ft)
    anchor = strip_fastai(get_anchor(ft))
    module_name = strip_fastai(get_module_name(ft))
    base = '' if use_relative_links else FASTAI_DOCS
    return f'{base}/{module_name}.html#{anchor}'
924088
private function endItem()
    {
        if ($this->version == Feed::RSS2 || $this->version == Feed::RSS1) {
            return '</item>' . PHP_EOL;
        } elseif ($this->version == Feed::ATOM) {
            return '</entry>' . PHP_EOL;
        }
    }