Skip to content

Commit

Permalink
remove readability spout
Browse files Browse the repository at this point in the history
It was broken anyway so hopefully it will not matter.
  • Loading branch information
jtojnar committed Jan 9, 2018
1 parent df5306d commit 56f1d1a
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 150 deletions.
5 changes: 0 additions & 5 deletions _docs/website/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -286,10 +286,6 @@ <h2 id="configuration_params">Configuration</h2>
<td class="documentation-first-column">use_system_font</td>
<td>set use_system_font=1 if you have problems with special characters. Then instead of Open Sans the font Arial will be used.</td>
</tr>
<tr>
<td class="documentation-first-column">readability</td>
<td>default API key for all feeds fetched by readability spout. You can also enter the readability API key in the spout parameters for every single feed.</td>
</tr>
<tr>
<td class="documentation-first-column">allow_public_update_access</td>
<td>set allow_public_update_access=1 for allowing public access for /update (anybody can access and start the update job).</td>
Expand Down Expand Up @@ -448,7 +444,6 @@ <h2>Extend</h2>
<li>heise News with full content</li>
<li>golem News with full content</li>
<li>MMOSpy News with full content</li>
<li>RSS Feeds with readability</li>
</ul>
<p>
If you want to get the newest entries from your own source (e.g. an IMAP Email Account, Log Files or any data from your own application), you can include a new spout in your selfoss stream by writing just one php class (saved in one php file).
Expand Down
1 change: 0 additions & 1 deletion defaults.ini
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ auto_collapse=0
auto_stream_more=1
anonymizer=
use_system_font=
readability=
share=gtfpde
wallabag=
wallabag_version=1
Expand Down
33 changes: 0 additions & 33 deletions spouts/reddit/reddit2.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,6 @@ class reddit2 extends \spouts\spout {
]
];

/** @var string the readability api key */
private $apiKey = '';

/** @var string the reddit_session cookie */
private $reddit_session = '';

Expand All @@ -93,8 +90,6 @@ class reddit2 extends \spouts\spout {
* @return void
*/
public function load($params) {
$this->apiKey = \F3::get('readability');

if (!empty($params['password']) && !empty($params['username'])) {
if (function_exists('apc_fetch')) {
$this->reddit_session = apc_fetch("{$params['username']}_selfoss_reddit_session");
Expand Down Expand Up @@ -265,9 +260,6 @@ public function getContent() {
return '<a href="' . $this->getHtmlUrl() . '"><img src="' . preg_replace("/s\./", '.', $this->getImage($response->getBody())) . '"/></a>';
}
if ($this->scrape) {
if ($contentFromReadability = $this->fetchFromReadability($this->getHtmlUrl())) {
return $contentFromReadability;
}
if ($contentFromInstapaper = $this->fetchFromInstapaper($this->getHtmlUrl())) {
return $contentFromInstapaper;
}
Expand Down Expand Up @@ -352,31 +344,6 @@ public function getXmlUrl($params) {
return 'reddit://' . urlencode($params['url']);
}

/**
* fetch content from readability.com
*
* @author oxman @github
*
* @throws \GuzzleHttp\Exception\RequestException When an error is encountered
* @throws \RuntimeException if the response body is not in JSON format
*
* @return string content
*/
private function fetchFromReadability($url) {
if (empty($this->apiKey)) {
return false;
}

$response = $this->sendRequest('https://readability.com/api/content/v1/parser?token=' . $this->apiKey . '&url=' . urlencode($url));

$data = $response->json();
if (!isset($data['content'])) {
return false;
}

return $data['content'];
}

/**
* fetch content from instapaper.com
*
Expand Down
111 changes: 0 additions & 111 deletions spouts/rss/readability.php

This file was deleted.

0 comments on commit 56f1d1a

Please sign in to comment.