protected static function scrape(array &$attributes, $url, array $config, $cacheDir)
	{
		$vars = [];
		if (self::addNamedCaptures($vars, $url, $config['match']))
		{
			if (isset($config['url']))
			{
				$url = self::interpolateVars($config['url'], $vars + $attributes);
			}
			if (preg_match('(^https?://[^#]+)i', $url, $m))
			{
				$response = self::wget($m[0], $cacheDir, $config);
				self::addNamedCaptures($attributes, $response, $config['extract']);
			}
		}
	}
protected static function scrape(array &$attributes, $url, array $config, $cacheDir)
	{
		$vars = [];
		if (self::addNamedCaptures($vars, $url, $config['match']))
		{
			if (isset($config['url']))
			{
				$url = self::interpolateVars($config['url'], $vars + $attributes);
			}
			if (preg_match('(^https?://[^#]+)i', $url, $m))
			{
				$response = self::wget($m[0], $cacheDir, $config);
				self::addNamedCaptures($attributes, $response, $config['extract']);
			}
		}
	}
protected static function scrape ( array & $ attributes , $ url , array $ config , $ cacheDir ) { $ vars = [ ] ; if ( self :: addNamedCaptures ( $ vars , $ url , $ config [ 'match' ] ) ) { if ( isset ( $ config [ 'url' ] ) ) { $ url = self :: interpolateVars ( $ config [ 'url' ] , $ vars + $ attributes ) ; } if ( preg_match ( '(^https?://[^#]+)i' , $ url , $ m ) ) { $ response = self :: wget ( $ m [ 0 ] , $ cacheDir , $ config ) ; self :: addNamedCaptures ( $ attributes , $ response , $ config [ 'extract' ] ) ; } } }
Scrape values and add them to current attributes

@param  array       &$attributes Attributes
@param  string|null  $cacheDir   Path to the cache directory
@param  string       $url        Original URL
@param  array        $config     Scraping config
@return void
Scrape values and add them to current attributes