Skip to content

Commit 65bad6d

Browse files
committed
[AkamaiBridge] Add bridge
This bridge uses the CSS selector feed expander groundwork. However, it absolutely requires custom headers. Akamai else just drops a connection, leading to painful timeouts.
1 parent 1d8c630 commit 65bad6d

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

bridges/AkamaiBridge.php

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?php
2+
3+
class AkamaiBridge extends CssSelectorFeedExpanderBridge
4+
{
5+
const MAINTAINER = 'Mynacol';
6+
const NAME = 'Akamai Blog';
7+
const URI = 'https://www.akamai.com/blog';
8+
const DESCRIPTION = 'Akamai CDN Blog';
9+
const PARAMETERS = [
10+
[
11+
'limit' => self::LIMIT
12+
]
13+
];
14+
15+
protected $headers = [
16+
'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:142.0) Gecko/20100101 Firefox/142.0',
17+
'Accept-Language: en',
18+
];
19+
20+
public function collectData() {
21+
$this->collectDataInternal(
22+
'https://feeds.feedburner.com/akamai/blog', 'section.main-content',
23+
'.socialshare, .button, .blogauthor, .taglist, .cmp-prismjs__copy', false, false, true, $this->getInput('limit') ?? 5
24+
);
25+
}
26+
}

0 commit comments

Comments
 (0)