Save an archive link of bookmarks
This commit is contained in:
parent
7688bb51d9
commit
917a673f05
2 changed files with 3 additions and 3 deletions
|
@ -46,8 +46,8 @@ class ProcessBookmark implements ShouldQueue
|
|||
//get an internet archive link
|
||||
$response = $client->request('GET', 'https://web.archive.org/save/' . $this->bookmark->url);
|
||||
if ($response->hasHeader('Content-Location')) {
|
||||
if (starts_with($response->getHeader('Content-Location'), '/web')) {
|
||||
$this->bookmark->archive = $response->getHeader('Content-Location');
|
||||
if (starts_with($response->getHeader('Content-Location')[0], '/web')) {
|
||||
$this->bookmark->archive = $response->getHeader('Content-Location')[0];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue