1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-08-04 23:57:29 +02: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

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;
}