@@ -33,13 +33,13 @@ discard block |
||
| 33 | 33 | class ExternRefTransformer implements ExternRefTransformerInterface |
| 34 | 34 | { |
| 35 | 35 | public const HTTP_REQUEST_LOOP_DELAY = 10; |
| 36 | - public const LOG_REQUEST_ERROR = __DIR__ . '/../../Application/resources/external_request_error.log'; // todo move |
|
| 37 | - public const SKIP_DOMAIN_FILENAME = __DIR__ . '/../resources/config_skip_domain.txt'; |
|
| 36 | + public const LOG_REQUEST_ERROR = __DIR__.'/../../Application/resources/external_request_error.log'; // todo move |
|
| 37 | + public const SKIP_DOMAIN_FILENAME = __DIR__.'/../resources/config_skip_domain.txt'; |
|
| 38 | 38 | public const REPLACE_404 = true; |
| 39 | - public const CONFIG_PRESSE = __DIR__ . '/../resources/config_presse.yaml'; |
|
| 40 | - public const CONFIG_NEWSPAPER_JSON = __DIR__ . '/../resources/data_newspapers.json'; |
|
| 41 | - public const CONFIG_SCIENTIFIC_JSON = __DIR__ . '/../resources/data_scientific_domain.json'; |
|
| 42 | - public const CONFIG_SCIENTIFIC_WIKI_JSON = __DIR__ . '/../resources/data_scientific_wiki.json'; |
|
| 39 | + public const CONFIG_PRESSE = __DIR__.'/../resources/config_presse.yaml'; |
|
| 40 | + public const CONFIG_NEWSPAPER_JSON = __DIR__.'/../resources/data_newspapers.json'; |
|
| 41 | + public const CONFIG_SCIENTIFIC_JSON = __DIR__.'/../resources/data_scientific_domain.json'; |
|
| 42 | + public const CONFIG_SCIENTIFIC_WIKI_JSON = __DIR__.'/../resources/data_scientific_wiki.json'; |
|
| 43 | 43 | public const ROBOT_NOINDEX_WHITELIST = ['legifrance.gouv.fr']; |
| 44 | 44 | |
| 45 | 45 | public $skipSiteBlacklisted = true; |
@@ -147,7 +147,7 @@ discard block |
||
| 147 | 147 | { |
| 148 | 148 | $this->url = $url; |
| 149 | 149 | if (!ExternHttpClient::isHttpURL($url)) { |
| 150 | - $this->log->debug('Skip : not a valid URL : ' . $url); |
|
| 150 | + $this->log->debug('Skip : not a valid URL : '.$url); |
|
| 151 | 151 | return false; |
| 152 | 152 | } |
| 153 | 153 | |
@@ -155,12 +155,12 @@ discard block |
||
| 155 | 155 | return false; |
| 156 | 156 | } |
| 157 | 157 | if (!ExternHttpClient::isHttpURL($url)) { |
| 158 | - throw new Exception('string is not an URL ' . $url); |
|
| 158 | + throw new Exception('string is not an URL '.$url); |
|
| 159 | 159 | } |
| 160 | 160 | try { |
| 161 | 161 | $this->domain = (new InternetDomainParser())->getRegistrableDomainFromURL($url); |
| 162 | 162 | } catch (Exception $e) { |
| 163 | - $this->log->warning('Skip : not a valid URL : ' . $url); |
|
| 163 | + $this->log->warning('Skip : not a valid URL : '.$url); |
|
| 164 | 164 | return false; |
| 165 | 165 | } |
| 166 | 166 | |
@@ -195,7 +195,7 @@ discard block |
||
| 195 | 195 | $this->summary->memo['sites'][] = $this->externalPage->getPrettyDomainName(); |
| 196 | 196 | } |
| 197 | 197 | if (isset($mapData['accès url'])) { |
| 198 | - $this->log->notice('accès |
|