diff --git a/.gitignore b/.gitignore index 4c658bf7..9a267f6a 100644 --- a/.gitignore +++ b/.gitignore @@ -226,3 +226,4 @@ pip-log.txt ############## /cache /whitelist.txt +DEBUG diff --git a/README.md b/README.md index 9ffd9d1b..4bc918dc 100644 --- a/README.md +++ b/README.md @@ -113,6 +113,7 @@ Technical notes === * There is a cache so that source services won't ban you even if you hammer the rss-bridge with requests. Each bridge has a different duration for the cache. The `cache` subdirectory will be automatically created and cached objects older than 24 hours get purged. * To implement a new rss-bridge, [follow the specifications](CREATE_BRIDGE.md) and take a look at existing bridges for examples. + * To enable debug mode (disabling cache and enabling error reporting), create an empty file named `DEBUG` in the root directory (next to `index.php`). Rant === diff --git a/bridges/BandcampBridge.php b/bridges/BandcampBridge.php index 8d1d2aaf..ce002e5c 100644 --- a/bridges/BandcampBridge.php +++ b/bridges/BandcampBridge.php @@ -33,10 +33,14 @@ class BandcampBridge extends BridgeAbstract{ } foreach($html->find('li.item') as $release) { + $script = $release->find('div.art', 0)->getAttribute('onclick'); + $uri = ltrim($script, "return 'url("); + $uri = rtrim($uri, "')"); + $item = new \Item(); $item->name = $release->find('div.itemsubtext',0)->plaintext . ' - ' . $release->find('div.itemtext',0)->plaintext; $item->title = $release->find('div.itemsubtext',0)->plaintext . ' - ' . $release->find('div.itemtext',0)->plaintext; - $item->content = '
' . $release->find('div.itemsubtext',0)->plaintext . ' - ' . $release->find('div.itemtext',0)->plaintext; + $item->content = '
' . $release->find('div.itemsubtext',0)->plaintext . ' - ' . $release->find('div.itemtext',0)->plaintext; $item->id = $release->find('a',0)->getAttribute('href'); $item->uri = $release->find('a',0)->getAttribute('href'); $this->items[] = $item; diff --git a/bridges/CNETBridge.php b/bridges/CNETBridge.php index ec7decf0..42c78a94 100644 --- a/bridges/CNETBridge.php +++ b/bridges/CNETBridge.php @@ -9,7 +9,7 @@ class CNETBridge extends BridgeAbstract { $this->name = 'CNET News'; $this->uri = 'http://www.cnet.com/'; $this->description = 'Returns the newest articles.
You may specify a topic found in some section URLs, else all topics are selected.'; - $this->update = '2016-02-06'; + $this->update = '2016-03-16'; $this->parameters[] = '[ @@ -76,7 +76,7 @@ class CNETBridge extends BridgeAbstract { if (is_object($article_thumbnail)) $article_thumbnail = $article_thumbnail->find('img', 0)->src; - $article_content = trim(CleanArticle(ExtractFromDelimiters($article_html, '
', '