mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-23 08:33:24 +02:00
refactor: extract CurlHttpClient (#3532)
* refactor: extract CurlHttpClient * refactor * interface
This commit is contained in:
@@ -92,7 +92,12 @@ class AO3Bridge extends BridgeAbstract
|
||||
private function collectWork($id)
|
||||
{
|
||||
$url = self::URI . "/works/$id/navigate";
|
||||
$response = _http_request($url, ['useragent' => 'rss-bridge bot (https://github.com/RSS-Bridge/rss-bridge)']);
|
||||
$httpClient = RssBridge::getHttpClient();
|
||||
|
||||
$response = $httpClient->request($url, [
|
||||
'useragent' => 'rss-bridge bot (https://github.com/RSS-Bridge/rss-bridge)',
|
||||
]);
|
||||
|
||||
$html = \str_get_html($response['body']);
|
||||
$html = defaultLinkTo($html, self::URI);
|
||||
|
||||
|
Reference in New Issue
Block a user