mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-02-02 16:31:00 +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['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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue