Catch exceptions for image proxy
This commit is contained in:
parent
a78cf795b6
commit
a1e4432881
@ -50,14 +50,18 @@ function addProxyToTags($html, $website, $proxy_images, $cloak_referrer)
|
|||||||
|
|
||||||
function download($url)
|
function download($url)
|
||||||
{
|
{
|
||||||
if ((bool) Config\get('debug_mode')) {
|
try {
|
||||||
Logger::enable();
|
|
||||||
}
|
|
||||||
|
|
||||||
$client = Client::getInstance();
|
if ((bool) Config\get('debug_mode')) {
|
||||||
$client->setUserAgent(Config\HTTP_USER_AGENT);
|
Logger::enable();
|
||||||
$client->enablePassthroughMode();
|
}
|
||||||
$client->execute($url);
|
|
||||||
|
$client = Client::getInstance();
|
||||||
|
$client->setUserAgent(Config\HTTP_USER_AGENT);
|
||||||
|
$client->enablePassthroughMode();
|
||||||
|
$client->execute($url);
|
||||||
|
}
|
||||||
|
catch (\PicoFeed\Client\ClientException $e) {}
|
||||||
|
|
||||||
Config\write_debug();
|
Config\write_debug();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user