From 9e2975048fd460e8f09e843f6619c916a11d1d73 Mon Sep 17 00:00:00 2001 From: Joseph Date: Mon, 4 Aug 2025 21:56:27 +0100 Subject: [PATCH] [AskfmBridge] Remove bridge (#4652) Website closed in December 2024 https://web.archive.org/web/20241129120541/https://about.ask.fm/closure-notice-the-platform-to-be-deactivated-december-1-2024/ --- bridges/AskfmBridge.php | 80 ----------------------------------------- 1 file changed, 80 deletions(-) delete mode 100644 bridges/AskfmBridge.php diff --git a/bridges/AskfmBridge.php b/bridges/AskfmBridge.php deleted file mode 100644 index d0422890..00000000 --- a/bridges/AskfmBridge.php +++ /dev/null @@ -1,80 +0,0 @@ - [ - 'u' => [ - 'name' => 'Username', - 'required' => true, - 'exampleValue' => 'ApprovedAndReal' - ] - ] - ]; - - public function collectData() - { - $html = getSimpleHTMLDOM($this->getURI()); - - $html = defaultLinkTo($html, self::URI); - - foreach ($html->find('article.streamItem-answer') as $element) { - $item = []; - $item['uri'] = $element->find('a.streamItem_meta', 0)->href; - $question = trim($element->find('header.streamItem_header', 0)->innertext); - - $item['title'] = trim( - htmlspecialchars_decode( - $element->find('header.streamItem_header', 0)->plaintext, - ENT_QUOTES - ) - ); - - $item['timestamp'] = strtotime($element->find('time', 0)->datetime); - - $var = $element->find('div.streamItem_content', 0); - $answer = trim($var->innertext ?? ''); - - // This probably should be cleaned up, especially for YouTube embeds - if ($visual = $element->find('div.streamItem_visual', 0)) { - $visual = $visual->innertext; - } - - // Fix tracking links, also doesn't work - foreach ($element->find('a') as $link) { - if (strpos($link->href, 'l.ask.fm') !== false) { - $link->href = $link->plaintext; - } - } - - $item['content'] = '

' . $question - . '

' . $answer - . '

' . $visual . '

'; - - $this->items[] = $item; - } - } - - public function getName() - { - if (!is_null($this->getInput('u'))) { - return self::NAME . ' : ' . $this->getInput('u'); - } - - return parent::getName(); - } - - public function getURI() - { - if (!is_null($this->getInput('u'))) { - return self::URI . urlencode($this->getInput('u')); - } - - return parent::getURI(); - } -}