1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-01-17 06:08:27 +01:00

[ScribbleHubBridge] Handle 429 errors and use consistent GUID (#4104)

This commit is contained in:
July 2024-05-12 15:45:14 -04:00 committed by GitHub
parent 776ee233bd
commit 4949900863
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -107,12 +107,13 @@ class ScribbleHubBridge extends FeedExpander
}
$item['comments'] = $item['uri'] . '#comments';
$item['uid'] = $item['uri'];
try {
$dom = getSimpleHTMLDOMCached($item['uri']);
} catch (HttpException $e) {
// 403 Forbidden, This means we got anti-bot response
if ($e->getCode() === 403) {
if ($e->getCode() === 403 || $e->getCode() === 429) {
return $item;
}
throw $e;
@ -134,7 +135,6 @@ class ScribbleHubBridge extends FeedExpander
//Generate UID
$item_pid = $dom->find('#mypostid', 0)->value;
$item['uid'] = $item_sid . "/$item_pid";
return $item;
}