mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-03-12 11:11:01 +03:00
[ScribbleHubBridge] Handle 429 errors and use consistent GUID (#4104)
This commit is contained in:
parent
776ee233bd
commit
4949900863
1 changed files with 2 additions and 2 deletions
|
@ -107,12 +107,13 @@ class ScribbleHubBridge extends FeedExpander
|
||||||
}
|
}
|
||||||
|
|
||||||
$item['comments'] = $item['uri'] . '#comments';
|
$item['comments'] = $item['uri'] . '#comments';
|
||||||
|
$item['uid'] = $item['uri'];
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$dom = getSimpleHTMLDOMCached($item['uri']);
|
$dom = getSimpleHTMLDOMCached($item['uri']);
|
||||||
} catch (HttpException $e) {
|
} catch (HttpException $e) {
|
||||||
// 403 Forbidden, This means we got anti-bot response
|
// 403 Forbidden, This means we got anti-bot response
|
||||||
if ($e->getCode() === 403) {
|
if ($e->getCode() === 403 || $e->getCode() === 429) {
|
||||||
return $item;
|
return $item;
|
||||||
}
|
}
|
||||||
throw $e;
|
throw $e;
|
||||||
|
@ -134,7 +135,6 @@ class ScribbleHubBridge extends FeedExpander
|
||||||
|
|
||||||
//Generate UID
|
//Generate UID
|
||||||
$item_pid = $dom->find('#mypostid', 0)->value;
|
$item_pid = $dom->find('#mypostid', 0)->value;
|
||||||
$item['uid'] = $item_sid . "/$item_pid";
|
|
||||||
|
|
||||||
return $item;
|
return $item;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue