1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-08-15 21:14:07 +02:00

Compare commits

...

416 Commits

Author SHA1 Message Date
github-actions[bot]
6da40b8ec3 Upload pr2545-WordPress-pr-context1.html (d2ad2)
Pull request: https://github.com/RSS-Bridge/rss-bridge/pull/2545
Commit: d2ad22d3ef
2022-03-27 16:40:26 +00:00
github-actions[bot]
afc889a0e4 Upload pr2545-WordPress-current-context1.html (d2ad2)
Pull request: https://github.com/RSS-Bridge/rss-bridge/pull/2545
Commit: d2ad22d3ef
2022-03-27 16:40:25 +00:00
github-actions[bot]
5c684edf84 Upload pr2522-Phoronix-pr-context1.html (61b37)
Pull request: https://github.com/RSS-Bridge/rss-bridge/pull/2522
Commit: 61b37caeec
2022-03-27 11:19:11 +00:00
github-actions[bot]
0404be2d45 Upload pr2522-Phoronix-current-context1.html (61b37)
Pull request: https://github.com/RSS-Bridge/rss-bridge/pull/2522
Commit: 61b37caeec
2022-03-27 11:19:10 +00:00
github-actions[bot]
78e158cbcc Upload pr2545-WordPress-pr-context1.html (fed5b)
Pull request: https://github.com/RSS-Bridge/rss-bridge/pull/2545
Commit: fed5b01dbd
2022-03-27 01:54:42 +00:00
github-actions[bot]
2f1eade64b Upload pr2545-WordPress-current-context1.html (fed5b)
Pull request: https://github.com/RSS-Bridge/rss-bridge/pull/2545
Commit: fed5b01dbd
2022-03-27 01:54:42 +00:00
github-actions[bot]
cf82f9114e Upload pr2543-Arte7-pr-context2.html (f19f5)
Pull request: https://github.com/RSS-Bridge/rss-bridge/pull/2543
Commit: f19f5bab02
2022-03-26 18:36:04 +00:00
github-actions[bot]
5ae749f3b2 Upload pr2543-Arte7-pr-context1.html (f19f5)
Pull request: https://github.com/RSS-Bridge/rss-bridge/pull/2543
Commit: f19f5bab02
2022-03-26 18:36:03 +00:00
github-actions[bot]
029b20087d Upload pr2543-Arte7-current-context4.html (f19f5)
Pull request: https://github.com/RSS-Bridge/rss-bridge/pull/2543
Commit: f19f5bab02
2022-03-26 18:36:02 +00:00
github-actions[bot]
23c6f62d8b Upload pr2543-Arte7-current-context3.html (f19f5)
Pull request: https://github.com/RSS-Bridge/rss-bridge/pull/2543
Commit: f19f5bab02
2022-03-26 18:36:01 +00:00
github-actions[bot]
2768fd95f7 Upload pr2543-Arte7-current-context2.html (f19f5)
Pull request: https://github.com/RSS-Bridge/rss-bridge/pull/2543
Commit: f19f5bab02
2022-03-26 18:36:00 +00:00
github-actions[bot]
5932418f6d Upload pr2543-Arte7-current-context1.html (f19f5)
Pull request: https://github.com/RSS-Bridge/rss-bridge/pull/2543
Commit: f19f5bab02
2022-03-26 18:35:59 +00:00
github-actions[bot]
948eba546d Upload pr2541-FindACrew-pr-context1.html (babd8)
Pull request: https://github.com/RSS-Bridge/rss-bridge/pull/2541
Commit: babd82d3a4
2022-03-26 15:23:01 +00:00
github-actions[bot]
c06bb7d224 Upload pr2541-FindACrew-current-context1.html (babd8)
Pull request: https://github.com/RSS-Bridge/rss-bridge/pull/2541
Commit: babd82d3a4
2022-03-26 15:23:00 +00:00
github-actions[bot]
7a063e232b Upload pr2541-FindACrew-pr-context1.html (babd8)
Pull request: https://github.com/RSS-Bridge/rss-bridge/pull/2541
Commit: babd82d3a4
2022-03-26 15:18:28 +00:00
github-actions[bot]
368cfc4342 Upload pr2541-FindACrew-current-context1.html (babd8)
Pull request: https://github.com/RSS-Bridge/rss-bridge/pull/2541
Commit: babd82d3a4
2022-03-26 15:18:27 +00:00
github-actions[bot]
67ab97f4ac Upload pr2471-TwitterV2-pr-context3.html (e8319)
Pull request: https://github.com/RSS-Bridge/rss-bridge/pull/2471
Commit: e8319a98c2
2022-03-26 04:48:12 +00:00
github-actions[bot]
2e7c7bb5cd Upload pr2471-TwitterV2-pr-context2.html (e8319)
Pull request: https://github.com/RSS-Bridge/rss-bridge/pull/2471
Commit: e8319a98c2
2022-03-26 04:48:11 +00:00
github-actions[bot]
ef30655dd9 Upload pr2471-TwitterV2-pr-context1.html (e8319)
Pull request: https://github.com/RSS-Bridge/rss-bridge/pull/2471
Commit: e8319a98c2
2022-03-26 04:48:10 +00:00
github-actions[bot]
e94dbc471c Upload pr2471-TwitterV2-pr-context3.html (e665d)
Pull request: https://github.com/RSS-Bridge/rss-bridge/pull/2471
Commit: e665dc4ebc
2022-03-26 04:03:59 +00:00
github-actions[bot]
1ff5ad46a6 Upload pr2471-TwitterV2-pr-context2.html (e665d)
Pull request: https://github.com/RSS-Bridge/rss-bridge/pull/2471
Commit: e665dc4ebc
2022-03-26 04:03:58 +00:00
github-actions[bot]
327a82ded5 Upload pr2471-TwitterV2-pr-context1.html (e665d)
Pull request: https://github.com/RSS-Bridge/rss-bridge/pull/2471
Commit: e665dc4ebc
2022-03-26 04:03:57 +00:00
github-actions[bot]
9c377fad33 Upload pr1813-Unsplash-pr-context1.html (4a401)
Pull request: https://github.com/RSS-Bridge/rss-bridge/pull/1813
Commit: 4a4013f967
2022-03-26 00:03:02 +00:00
github-actions[bot]
4de906c9a9 Upload pr1813-Unsplash-current-context1.html (4a401)
Pull request: https://github.com/RSS-Bridge/rss-bridge/pull/1813
Commit: 4a4013f967
2022-03-26 00:03:02 +00:00
github-actions[bot]
79d077ccea Upload pr1813-Unsplash-pr-context1.html (58f05)
Pull request: https://github.com/RSS-Bridge/rss-bridge/pull/1813
Commit: 58f05a0c99
2022-03-25 23:59:40 +00:00
github-actions[bot]
9efa93df2b Upload pr1813-Unsplash-current-context1.html (58f05)
Pull request: https://github.com/RSS-Bridge/rss-bridge/pull/1813
Commit: 58f05a0c99
2022-03-25 23:59:40 +00:00
github-actions[bot]
82353fb3de Upload pr2451-GoogleGroups-pr-context1.html (3ba0d)
Pull request: https://github.com/RSS-Bridge/rss-bridge/pull/2451
Commit: 3ba0db1436
2022-03-25 23:56:31 +00:00
github-actions[bot]
4a0165b80e Upload pr2451-GoogleGroups-pr-context1.html (09d0a)
Pull request: https://github.com/RSS-Bridge/rss-bridge/pull/2451
Commit: 09d0abaa13
2022-03-25 23:19:14 +00:00
github-actions[bot]
2cedcadc2f Upload pr2451-GoogleGroups-pr-context1.html (85e65)
Pull request: https://github.com/RSS-Bridge/rss-bridge/pull/2451
Commit: 85e65a7aad
2022-03-25 22:44:04 +00:00
github-actions[bot]
64f511da32 Upload pr2048-TysolFr-pr-context1.html (f1b92)
Pull request: https://github.com/RSS-Bridge/rss-bridge/pull/2048
Commit: f1b9265718
2022-03-25 21:52:42 +00:00
github-actions[bot]
3c34c2bea2 Upload pr2048-Scmb-pr-context1.html (f1b92)
Pull request: https://github.com/RSS-Bridge/rss-bridge/pull/2048
Commit: f1b9265718
2022-03-25 21:52:41 +00:00
github-actions[bot]
bb578f5e9d Upload pr2048-Scmb-current-context1.html (f1b92)
Pull request: https://github.com/RSS-Bridge/rss-bridge/pull/2048
Commit: f1b9265718
2022-03-25 21:52:40 +00:00
github-actions[bot]
4375821199 Upload pr2048-Rumble-pr-context4.html (f1b92)
Pull request: https://github.com/RSS-Bridge/rss-bridge/pull/2048
Commit: f1b9265718
2022-03-25 21:52:40 +00:00
github-actions[bot]
653e82b0a9 Upload pr2048-Rumble-pr-context3.html (f1b92)
Pull request: https://github.com/RSS-Bridge/rss-bridge/pull/2048
Commit: f1b9265718
2022-03-25 21:52:39 +00:00
github-actions[bot]
10ea0faf9e Upload pr2048-Rumble-pr-context2.html (f1b92)
Pull request: https://github.com/RSS-Bridge/rss-bridge/pull/2048
Commit: f1b9265718
2022-03-25 21:52:39 +00:00
github-actions[bot]
b9e053c092 Upload pr2048-Rumble-pr-context1.html (f1b92)
Pull request: https://github.com/RSS-Bridge/rss-bridge/pull/2048
Commit: f1b9265718
2022-03-25 21:52:38 +00:00
github-actions[bot]
55786ec33c Upload pr2048-HentaiHaven-pr-context1.html (f1b92)
Pull request: https://github.com/RSS-Bridge/rss-bridge/pull/2048
Commit: f1b9265718
2022-03-25 21:52:37 +00:00
github-actions[bot]
1cd346dd18 Upload pr2048-HentaiHaven-current-context1.html (f1b92)
Pull request: https://github.com/RSS-Bridge/rss-bridge/pull/2048
Commit: f1b9265718
2022-03-25 21:52:37 +00:00
github-actions[bot]
e46b27dead Upload pr2476-EZTV-pr-context1.html (db8f5)
Pull request: https://github.com/RSS-Bridge/rss-bridge/pull/2476
Commit: db8f5a4a55
2022-03-25 21:19:59 +00:00
github-actions[bot]
05bfcfd347 Upload pr2476-EZTV-current-context1.html (db8f5)
Pull request: https://github.com/RSS-Bridge/rss-bridge/pull/2476
Commit: db8f5a4a55
2022-03-25 21:19:58 +00:00
github-actions[bot]
4a22681db2 Upload pr2476-EZTV-pr-context1.html (293b4)
Pull request: https://github.com/RSS-Bridge/rss-bridge/pull/2476
Commit: 293b4f293a
2022-03-25 20:10:23 +00:00
github-actions[bot]
9d28189c61 Upload pr2476-EZTV-current-context1.html (293b4)
Pull request: https://github.com/RSS-Bridge/rss-bridge/pull/2476
Commit: 293b4f293a
2022-03-25 20:10:23 +00:00
github-actions[bot]
876bd4984c Upload pr1594-YouTubeCommunityTab-pr-context2.html (ae4a1)
Pull request: https://github.com/RSS-Bridge/rss-bridge/pull/1594
Commit: ae4a14ee35
2022-03-25 19:50:45 +00:00
github-actions[bot]
1c9d74925b Upload pr1594-YouTubeCommunityTab-pr-context1.html (ae4a1)
Pull request: https://github.com/RSS-Bridge/rss-bridge/pull/1594
Commit: ae4a14ee35
2022-03-25 19:50:44 +00:00
github-actions[bot]
d861714fee Upload pr2535-DockerHub-pr-context2.html (fdddd)
Pull request: https://github.com/RSS-Bridge/rss-bridge/pull/2535
Commit: fdddd095ef
2022-03-25 18:57:50 +00:00
github-actions[bot]
184c997b08 Upload pr2535-DockerHub-pr-context1.html (fdddd)
Pull request: https://github.com/RSS-Bridge/rss-bridge/pull/2535
Commit: fdddd095ef
2022-03-25 18:57:49 +00:00
github-actions[bot]
31d6262f1e Upload pr2535-DockerHub-current-context2.html (fdddd)
Pull request: https://github.com/RSS-Bridge/rss-bridge/pull/2535
Commit: fdddd095ef
2022-03-25 18:57:48 +00:00
github-actions[bot]
1302560ba2 Upload pr2535-DockerHub-current-context1.html (fdddd)
Pull request: https://github.com/RSS-Bridge/rss-bridge/pull/2535
Commit: fdddd095ef
2022-03-25 18:57:47 +00:00
github-actions[bot]
f63803f8a2 Upload pr2535-DockerHub-pr-context2.html (228b1)
Pull request: https://github.com/RSS-Bridge/rss-bridge/pull/2535
Commit: 228b1ee299
2022-03-25 18:40:25 +00:00
github-actions[bot]
e584e82178 Upload pr2535-DockerHub-pr-context1.html (228b1)
Pull request: https://github.com/RSS-Bridge/rss-bridge/pull/2535
Commit: 228b1ee299
2022-03-25 18:40:24 +00:00
github-actions[bot]
504c31a8af Upload pr2535-DockerHub-current-context2.html (228b1)
Pull request: https://github.com/RSS-Bridge/rss-bridge/pull/2535
Commit: 228b1ee299
2022-03-25 18:40:23 +00:00
github-actions[bot]
dd8b816085 Upload pr2535-DockerHub-current-context1.html (228b1)
Pull request: https://github.com/RSS-Bridge/rss-bridge/pull/2535
Commit: 228b1ee299
2022-03-25 18:40:23 +00:00
github-actions[bot]
225b2ab142 Upload pr2535-DockerHub-pr-context2.html (59081)
Pull request: https://github.com/RSS-Bridge/rss-bridge/pull/2535
Commit: 59081ff585
2022-03-25 16:07:54 +00:00
github-actions[bot]
e6ef24021a Upload pr2535-DockerHub-pr-context1.html (59081)
Pull request: https://github.com/RSS-Bridge/rss-bridge/pull/2535
Commit: 59081ff585
2022-03-25 16:07:53 +00:00
github-actions[bot]
baf094e12e Upload pr2535-DockerHub-current-context2.html (59081)
Pull request: https://github.com/RSS-Bridge/rss-bridge/pull/2535
Commit: 59081ff585
2022-03-25 16:07:53 +00:00
github-actions[bot]
2d1d6473f2 Upload pr2535-DockerHub-current-context1.html (59081)
Pull request: https://github.com/RSS-Bridge/rss-bridge/pull/2535
Commit: 59081ff585
2022-03-25 16:07:52 +00:00
Eugene Molotov
35b905c074 [core] Re-enable phpunit tests (#2393) 2022-03-25 12:09:05 +01:00
Yaman Qalieh
197149d90b [CraigslistBridge] Add new bridge (#2479) 2022-03-25 10:58:54 +01:00
Bocki
f11e792f84 [maintenance] Fix tests (#2532) 2022-03-25 10:41:27 +01:00
Jacob Zelek
071412130b [SummitsOnTheAir] New bridge (#2096) 2022-03-25 09:48:55 +01:00
Dag
8b59772be3 [ElsevierBridge] fix: typo in exampleValue 2022-03-25 03:42:05 +01:00
Dag
6e0589f9a0 [EconomistBridge] fix: broken bridge
Fixes: Call to a member function find() on boo

The new-style articles had their DOM changed.
2022-03-25 03:07:35 +01:00
Dag
b57d19b29c [DesoutterBridge] fix: default value 2022-03-25 02:29:51 +01:00
Dag
dbd480e2c0 [AsahiShimbunAJWBridge] fix: use case sensitive list value
This bug happened not in web UI but when extracting the default
value in order to do automatic testing.
2022-03-25 02:04:55 +01:00
Dag
35afee6103 [ABCNews] fix: broken css selector 2022-03-25 01:41:40 +01:00
Yaman Qalieh
32a6348418 [NordbayernBridge] Fix linting issue (#2531) 2022-03-25 01:26:57 +01:00
quickwick
b5ab2ee676 Add stickers endpoint for search (#2483) 2022-03-25 01:25:53 +01:00
Yaman Qalieh
acef0ab5cc [WallpaperStopBridge] Delete bridge (#2458)
This website is no longer serving content
2022-03-25 01:05:05 +01:00
Yaman Qalieh
e0d99f2a84 [DavesTrailerPageBridge] Add timestamps to feed (#2456) 2022-03-25 01:02:16 +01:00
Niehztog
55acf661b9 add support for more media types as enclosures, handle result of /tex… (#2324) 2022-03-25 00:30:14 +01:00
eggwhalefrog
3a9e528301 [NordbayernBridge] add author & timestamp of article (#2309) 2022-03-25 00:28:06 +01:00
Florent Machen
297a6cf191 [WorldCosplayBridge] fix Cosplayer API response structure (#2307) 2022-03-25 00:27:23 +01:00
Florent Machen
9cd8e93bb9 [GQMagazineBridge] fix retrieve the content of an article at a given url (#2305) 2022-03-25 00:26:38 +01:00
Dag
943a5e3e8b [CryptomeBridge] Fix pageformat (#2239) 2022-03-25 00:11:28 +01:00
Yaman Qalieh
2ade568a84 [WikipediaBridge] Add Russian Version (#2529) 2022-03-25 00:02:38 +01:00
Dag
50bab079e1 feat: add new bridge HashnodeBridge (#2231)
https://github.com/RSS-Bridge/rss-bridge/pull/2231
2022-03-24 23:58:17 +01:00
Yaman Qalieh
bb06826680 [FolhaDeSaoPauloBridge] Fix Linting Issue (#2528) 2022-03-24 23:36:23 +01:00
Dag
534864f47b Revert "WikipediaBridge: Added russian version (#2184)"
Was buggy.

This reverts commit f7af2beb79.
2022-03-24 23:34:43 +01:00
NikNikYkt
f7af2beb79 WikipediaBridge: Added russian version (#2184) 2022-03-24 23:32:33 +01:00
Yaman Qalieh
76ade41543 [No Squash] Fix Linting (#2527) 2022-03-24 23:24:55 +01:00
somini
cb4bc57c72 [FolhaDeSaoPauloBridge]: Small improvements (#1724) 2022-03-24 23:16:02 +01:00
sysadminstory
5c69577253 [ZoneTelechargementBridge] Fix links (#2526) 2022-03-24 23:13:40 +01:00
dawidsowa
78a5136cc9 bridges: change 'tags' to 'categories' (#1942) 2022-03-24 23:04:12 +01:00
Michael Bemmerl
1f2b295bf3 [BundestagParteispendenBridge] Add bridge to get the latest donations (#1613) 2022-03-24 22:42:15 +01:00
Michael Bemmerl
e89b4287b8 [SchweinfurtBuergerinformationenBridge] Add new bridge (#1610) 2022-03-24 22:37:44 +01:00
µKöff
02ab11121b [LaTeX3ProjectNewslettersBridge] New Bridge (#1589) 2022-03-24 22:26:19 +01:00
Paroleen
3d570761e5 [SpotifyBridge] Add new bridge (#1535) 2022-03-24 21:58:53 +01:00
Joseph
1ae7cf6530 [ScribdBridge] Fix bridge (#1478) 2022-03-24 21:32:16 +01:00
Jakub Valenta
8e2b65556f [Config] Don't check PATH_CACHE for memcached (#1489) 2022-03-24 21:29:16 +01:00
Joseph
0d20e9a05c [BandcampDailyBridge] Add Bridge (#1485) 2022-03-24 21:21:57 +01:00
Antoine Turmel
6a72432f76 Proposition : Open new feeds in a new tab #1389 2022-03-24 20:37:34 +01:00
Joseph
296ff9c63a [KilledbyGoogleBridge] Add bridge (#1373) 2022-03-24 20:03:18 +01:00
Bocki
2bba89d0f5 [DonnonsBridge] Fix linting error (#2524) 2022-03-24 12:15:22 +01:00
Bocki
b1c36da14e [GiphyBridge] Add examplevalue (#2523) 2022-03-24 12:11:01 +01:00
Bocki
1a8d0babd1 [Multiple] Fix all exampleValues and required variables (#2296) 2022-03-24 11:59:34 +01:00
Dag
f766193106 [IndeedBridge] fix: broken bridge
The html was reworked.
2022-03-24 13:52:02 +05:00
Dag
b6d1c7a58f fix: php notice
Fixes:
Notice: Undefined variable: message in /home/rssbridge/public/lib/contents.php on line 39
2022-03-24 13:52:02 +05:00
Dag
f34e09e93b [GithubGist] fix: broken css selector for title 2022-03-24 13:52:02 +05:00
Dag
384790537b fix: bug in cloudflare response detection
The cloudflare server header was not recognized in
some cases such as when the server header is "server"
or when the header value is "Cloudflare".
2022-03-24 13:52:02 +05:00
Dag
7bdc53125c fix: properly verify the existence of the curl module
This fixes a bug where it didnt use curl from cli
even though it's installed.

I believe this preserves the original intention to
not require the curl module to be installed.

https://github.com/RSS-Bridge/rss-bridge/pull/979
2022-03-24 13:52:02 +05:00
Binnette
076c413d3e Fix DonnonsBridge image not showing (#2521) 2022-03-24 13:51:55 +05:00
mw80
26f0380aaa [InstagramBridge] Add detectParameters (#1476) 2022-03-23 08:09:59 +05:00
Dag
14a7516625 feat: add new bridge StandfordSIRbookreviewBridge (#1638) 2022-03-23 00:43:26 +01:00
Dag
c30c0200d5 [TheTVDBBridge] fix: remove dead bridge
https://github.com/RSS-Bridge/rss-bridge/pull/1482
2022-03-23 00:07:41 +01:00
Dag
e01d9d1700 Squashed commit of the following:
commit 81d7934ab9
Author: µKöff <muekoeff@muekev.de>
Date:   Thu May 28 14:55:00 2020 +0200

    [FunkBridge] New Bridge
2022-03-22 22:42:15 +01:00
Joseph
d41aa84b13 [BridgeCard] Use full bridge name in data-ref tag (#1560)
Updates the data-ref tag of each bridge card to use the bridge's full name (eg. Apple Music) instead of its filename (eg. AppleMusic). This fixes issues with the search not returned some bridges.
2022-03-22 22:08:26 +01:00
Dag
6211a2cd37 [TagBoardBridge] fix: remove dead bridge
https://github.com/RSS-Bridge/rss-bridge/pull/1474
2022-03-22 21:38:16 +01:00
Bocki
76f5de3d0f [Documentation] Move all wiki pages into the repo and make it pretty (#2494) 2022-03-22 21:33:29 +01:00
t0stiman
16470e8119 [CarThrottleBridge] add bridge for carthrottle.com (#2514) 2022-03-22 21:15:40 +01:00
Dag
1fd3b12512 [ExecuteProgramBridge] style: remove execution bits 2022-03-22 21:11:18 +01:00
Dag
5aa163e7d6 [GettrBridge] fix: don't use php7.2 feature
The constant "JSON_THROW_ON_ERROR" is not present in
PHP version 7.2 or earlier
2022-03-22 21:08:15 +01:00
Bocki
ec90bd905e Add debug case (#2292) 2022-03-22 20:47:40 +01:00
dag
b646afffff [ExecuteProgramBridge] Add new bridge for www.executeprogram.com (#2339) 2022-03-22 20:46:59 +01:00
dag
05c31f49ce [ETTVBridge] fix: remove bridge ETTVBridge (#2511)
They went dead in Feb 2022.

Piracy Icon ETTV Officially Shuts Down Due to a Lack of Funds.

https://torrentfreak.com/piracy-icon-ettv-officially-shuts-down-due-to-a-lack-of-funds-220206/
2022-03-22 20:43:55 +01:00
dag
0b123ef8be [GettrBridge] Add new bridge for gettr.com (#2495) (#2505) 2022-03-22 20:43:31 +01:00
dag
cd5c59b84c [ARDMediathekBridge] remove timezone modification (#2507) 2022-03-22 20:42:54 +01:00
dag
e8db2479b5 [GithubTrendingBridge] fix: the description selector was broken (#2513) 2022-03-22 20:41:59 +01:00
dag
c87f4631f2 [core] feat: improve date rendering in html formatter (#2516) 2022-03-22 20:41:13 +01:00
Bockiii
ac8e94ec56 [EconomistBridge] Fix for new layout (#2489) 2022-03-23 00:24:07 +05:00
dag
1a3419a2d4 [GiphyBridge] Lazy load images (#2512)
This change instructs browsers to gradually load images
as the user is scrolling down. This is good for performance
because browsers wont download all images right away.
2022-03-21 00:43:25 +05:00
sysadminstory
ad6549efec [ZoneTelechargementBridge] (#2503)
The website keeps activating the Cloudflare protection even on the "non"
standard URL.

To bypass the Cloudflare protection, the bridge tries to resolve a bucnh
of known subdomains, and check if the IP is in a Cloudflare IP range.

If one of the subdomains has a "non Cloudflare" IP, then we use the
CURL_RESOLVE Curl option to connect the unprotected URL using the real
IP instead of the Cloudflare IP.

I hope this will help the bridge to work without needing a fix every week !
2022-03-18 14:01:46 +05:00
dag
3638b5553a phpcs: allow short array syntax (#2506)
Short array syntax was added to PHP in PHP 5.4 (2012) and replaces array() with []
2022-03-18 13:58:47 +05:00
User123698745
a7e70926f9 [Docker file] Fix wrong version string in docker images (#2497)
do not fully ignore git directory when building docker images
".git/HEAD" and ".git/refs/heads/*" are required by "getVersion()" in "lib/Configuration.php" to build the version string
2022-03-14 05:48:40 +05:00
Paul Staroch
18504f2356 [lib/contents.php] Use variable name 'retVal' instead of 'retval' as variable names are case-sensitive (#2498) 2022-03-14 05:46:30 +05:00
Eugene Molotov
05273a9278 [core] Make getContents exceptions to be handled correctly and correct exception message (#2447)
This commit fixes following issues:
1. 'Unexpected response' error message was returned, even if upstream did not return anything
2. Inability to handle non-20x messages with checking response body
2022-03-12 01:18:01 +05:00
Tomasz Kane
2e88955648 [CdactionBridge] Add missing channels (#2477) 2022-03-10 02:03:21 +05:00
Mynacol
cbef3b3360 [HeiseBridge] Properly extract authors (#2466) 2022-03-05 23:51:03 +05:00
Jonathan Kay
9564e9291f [ComicsKingdomBridge] Grab the last meta og:url content instead of first (#2484)
There are now two og:url values on the page, the first no longer contains the necessary date URL for the bridge to work.  Finding the last og:url on the page restores the bridge to working order.
2022-03-05 23:47:04 +05:00
sysadminstory
ad1ef3425a [ZoneTelechargementBridge] Fix protected links URL (#2481)
Links URL have been changed: the rewriteProtectedLink function is now updated !
2022-03-03 10:57:12 +05:00
csisoap
3bd4b0d6ab [ReutersBridge] Fix unexpected behaviour with article (#2478)
Sometimes, there are some articles that redirected to another site,
cause the bridge to fail.

Also about disable UID, Reuters frequently updated their article and my
feed reader don't update, I think it's maybe its UID.
2022-03-02 09:50:02 +05:00
Yaman Qalieh
6585ebc89b [ActionFactory] Prevent leaking working directory (#2480) 2022-03-01 14:14:53 +05:00
Corentin Garcia
d94bb08259 [RainbowSixSiegeBridge] Fix bridge (#2475) 2022-02-27 23:33:46 +05:00
Mynacol
2811bdc054 [HeiseBridge] Consistently use seite=all parameter (#2465)
This also filters out the parameter wt_mc=rss.red.ho.ho.atom.beitrag.beitrag from the item uri.
2022-02-24 23:41:42 +05:00
Joseph
0cf9da927e [CodebergBridge] Fix bridge (#2464) 2022-02-24 00:31:08 +05:00
Eugene Molotov
73a5dd928a [TwitterBridge] Don't decode HTML entities for feed content (#2470) 2022-02-24 00:28:29 +05:00
Yaman Qalieh
680fa29668 [ContainerLinuxReleasesBridge] Delete bridge (#2455)
CoreOS has been discontinued and coreos.com has been taken down (it redirects to redhat.com)
2022-02-19 17:43:04 +05:00
Loïc Fürhoff
765af484bc [RtsBridge] Add new bridge for Radio Télévision Suisse (#2442) 2022-02-17 08:15:19 +05:00
Jonathan Kay
7252252e3c [ComicsKingdomBridge] Fixes to accomodate new layout and site changes (#2444) 2022-02-13 12:27:41 +05:00
sysadminstory
3c18784576 [ZoneTelechargementBridge] Follow site changes (#2426) 2022-02-12 12:59:54 +05:00
Bockiii
3cde07db10 [Dockerfile] Rebase on php:7-apache-buster (#2446) 2022-02-12 09:27:01 +05:00
Yaman Qalieh
8723647513 [GooglePlayStoreBridge] Add bridge (#2110) 2022-02-12 09:17:12 +05:00
Eugene Molotov
f54c996e0f [CI] Add check, if php files are marked as non-executable (#2439) 2022-01-30 14:20:47 +05:00
Tomasz Kane
09fac3aa35 [CdactionBridge] Add new bridge (#2431) 2022-01-30 13:52:00 +05:00
ORelio
c1c998dd13 [GBAtempBridge] Fix content extraction (#2314)
Bridge was broken since GBAtemp's Xenforo 2 upgrade on 2021-09-23
2022-01-29 10:29:01 +05:00
Eugene Molotov
fb19142a54 [InstagramBridge] Add options to reduce 429 errors
First option is session_id of existing Instagram account.
Second option is customizing cache timeout for InstagramBridge.

Those options can be combined.
2022-01-26 00:35:15 +05:00
Eugene Molotov
9be00ff84e [core] Load bridge configuration immediately after creating bridge object
Primary reason is allowing to load configuration
params, when executing getCacheTimeout
2022-01-26 00:32:37 +05:00
Mitsu
918041cc28 [FDroid] minor syntax fix for phpcs 2022-01-24 12:41:33 +01:00
Mitsu
e9f871ce68 [FDroid] cache up, add timestamp extraction
- increase caching from 2 to 4 hours
- using cURL, extract Last-Modified header of app icons and use as item timestamp
Test warning: F-Droid response time is quite slow even on static assets, the additional requests might impact bridge performance further
2022-01-24 12:36:49 +01:00
Sandro
018fd1c8f2 [GithubPullRequestBridge] Sort by newest PRs instead of latest updated (#2064) 2022-01-24 10:58:54 +05:00
Eugene Molotov
30553d8665 contrib: lint fetch_contributors.php 2022-01-20 10:22:10 +05:00
Eugene Molotov
5df8bf956a Bump version to dev.2022-01-20 2022-01-20 10:17:59 +05:00
Eugene Molotov
a49767e71b [README] Update list of contributors 2022-01-20 10:17:06 +05:00
Eugene Molotov
0584fdddde README: add buttons to irc and matrix 2022-01-20 10:12:08 +05:00
Eugene Molotov
0fdd281fb2 README: take out debian and guix buttons, since they are not officially maintained 2022-01-20 09:45:53 +05:00
Eugene Molotov
0e17282f60 contrib: add somehow working emacs script to help prepare new release 2022-01-20 09:43:01 +05:00
Eugene Molotov
0f1ec4a879 contrib: save template for creating new releases 2022-01-20 09:43:01 +05:00
Eugene Molotov
e9d3d7ba67 [contrib] Place script for fetching contributors from GitHub's gist to contrib directory
No need to depend on gist.github.com
2022-01-20 09:43:01 +05:00
岳东辰
3cef35a432 [ABCNewsBridge] New bridge (#2255) 2022-01-17 10:35:01 +05:00
Eugene Molotov
2f10d2345a [TwitterBridge] Meet the new maintainer: arnd-s 2022-01-16 23:42:28 +05:00
arnd-s
02a8ae4c62 [TwitterBridge] Use Twitter API V1.1 guest/activate for requesting new guest tokens (#2414)
Instead of searching inside base html page for the guest token, this patch instead uses the Twitter API V1.1 to acquire guest tokens
2022-01-16 07:59:02 +05:00
Štěpán Škorpil
084a1bcf19 [CeskaTelevizeBridge] Follow website changes (#2420) 2022-01-16 07:54:20 +05:00
Dag
418f951dd1 [ThePirateBayBridge] Repair broken bridge
This is more like a refactor because they dont serve data in plain
html anymore. Instead, the data is available from a json api
at apibay.org

Could possibly expand this bridge because their api has more to give.

I learned about this api by grokking https://thepiratebay.org/static/main.js
and by looking at browser ajax requests.

For some unknown reason they host some static assets at
https://torrindex.net/ which is used by the bridge to render
magnet image and user status image.

Signed-off-by: Dag <me@dvikan.no>
2022-01-15 11:18:57 +05:00
Bockiii
9dcce0ba1d [EconomistBridge] Fix if no article image present (#2328) 2022-01-15 10:29:18 +05:00
Joseph
607d9297ff [DuckDuckGoBridge] Fix bridge (#2335) 2022-01-15 10:24:13 +05:00
Joseph
c65feffb61 [FirefoxAddonsBridge] Fix add-on download links (#2338) 2022-01-15 10:16:43 +05:00
MarKoeh
f259fa7f9f [ARDMediathekBridge] Switch to JSON-API (#2380)
* Switch ARDMediathekBridge to JSON-API

The html screen scraping approach of ARDMediathekBridge did not work reliably. I could not find one show for which the item list was not empty using the html screen scraping approach.

The proposed change uses the JSON-API of the WebApp. Although there is still room for improvement (feed title, better understanding of the API, more accurate mimic of the webapp's behavior, de-pagination …), it does work with this change.

Indicate that now full URLs as well as just the ID are accepted.
2022-01-10 11:47:49 +01:00
sysadminstory
368a198321 [PepperBridge] fix and discussion (#2383)
* [PepperBridge] Fix some Notice for expired items

Some expired iteams are not identical to normal items for the title and
URI, so they got a special handling to remove PHP Notice.

The "most commented" sorting option was removed and show now some forum.
So it was removed.

With DealabsBridge, MydealsBridge and HotUKDealsBridge, you can monitor
a discussion for new comments, excluding or not post without URL
2022-01-10 11:46:26 +01:00
Albirew
590fdd9f9b [HentaiHavenBridge] domain and content retrieval update (#2402) 2022-01-10 11:44:41 +01:00
jNullj
799c93a3c6 [ExplosmBridge] Rewrite to work without feedburner (#2417)
* [ExplosmBridge] Rewrite to work without feedburner

re-wrote the bridge to scrap from the new explosm site as the old method of using feedburner is not working anymore, feedburner is stuck on dec/22 when the explosm site changed.
2022-01-10 11:44:18 +01:00
Quentin de Longraye
2f957b6870 [CI] Tag docker images with the commit sha (#2418)
We do not release stable tags often. To avoid using `latest`, for instance in Kubernetes manifests, this change allows to reference a repository commit. This way it is easy to lock image to a specific commit, and try and rollback if a change to a newer commit brings regressions.
2022-01-09 14:09:28 +05:00
arnd-s
12ff697ab0 [TwitterBridge] Continue using existing guesttoken from cache, when requesting a new one failed (#2396) 2022-01-06 10:59:37 +05:00
somini
8530aa54f2 [ComboiosDePortugalBridge] Temporarily ignore certificate checks (#2403) 2022-01-05 04:44:59 +05:00
Eugene Molotov
d0ef8aa71d [CI] Add support for php 8.0 and 8.1 (#2405) 2022-01-05 04:40:30 +05:00
Eugene Molotov
59e77a9e51 [README] Clarify problems with InstagramBridge and FacebookBridge (#2401) 2022-01-03 11:15:45 +05:00
Eugene Molotov
37cb4091d4 bridges: remove redundant "or returnServerError" after getContents/getSimpleHTMLDom/getSimpleHTMLDomCached (#2398)
When fetching website contents, exceptions already raise on fetching error
2022-01-02 14:36:09 +05:00
Christian Schabesberger
fc51c6753d [NordbayernBridge] Fix banner images (#2384) 2022-01-02 03:51:59 +05:00
sysadminstory
71cd15c35d [AutoJMBridge] Rework of the script to handle the new website (#2390)
The brand - model page does not have filters now, so the actual feed
using this bridge are broken.

Website has changed. The new website offers a new search function with
many more filter. So I switched to this new search page for this bridge.
2022-01-02 02:15:13 +05:00
Eugene Molotov
df408fb8bc [CI] Temporarly disable phpunit7 until it starts working again (#2392) 2021-12-26 09:25:36 +05:00
Shikiryu
e545f43a67 [KhinsiderBridge] Add bridge (#2302) 2021-12-20 12:36:44 +05:00
dag
ec55e99934 [HackerNewsUserThreadsBridge] Repair broken bridge (#2344) 2021-12-19 14:18:57 +05:00
dag
67e33186ce [GiphyBridge] Repair broken bridge (#2347) 2021-12-18 15:26:51 +05:00
sysadminstory
a0bbbd6978 [RadioMelodieBridge] Fix to use the new website layout (#2330) 2021-12-18 15:19:58 +05:00
Joseph
2ee091665a [ASRockNewsBridge] Fix bridge (#2373) 2021-12-18 15:17:16 +05:00
triatic
35930ee4e4 [TwitterBridge] Increase guest token expiry time (#2374) 2021-12-18 14:54:18 +05:00
Aaron F
e1290aa42c [CVEDetailsBridge] Add bridge (#2332)
CVE Details is a collection of CVEs, taken from the National Vulnerability
Database (NVD) and other sources like the Exploit DB and Metasploit. The
website categorizes it by vendor and product and attach the CWE category.
There is an Atom feed available, but only logged in users can use it,
it is not reliable and contain no useful information. This bridge create a
sane feed with additional information like tags and a link to the CWE
a description of the vulnerability.
2021-12-18 09:44:05 +05:00
dag
814711e3af [ScmbBridge] Remove "read more" text only if it exists (#2368) 2021-12-16 10:06:52 +05:00
Eugene Molotov
28db707587 [OpenClassroomsBridge] sebsauvage does not maintain this bridge
Reference: https://github.com/RSS-Bridge/rss-bridge/issues/2333#issuecomment-989611085
2021-12-09 15:26:31 +05:00
dag
b48739d0ba [DerpibooruBridge] Fix parsing of title (#2346)
The previous value was an int and was not accepted
by rss-bridge as a title. This change uses the image
name instead which fixes the problem and is a better
title than the image id.
2021-12-08 17:17:28 +01:00
csisoap
b9d92150e1 [ReutersBridge] Migrate to new API (#2348)
* [ReutersBridge] Migrate to new API

- Add new API, feeds.
- Old feed name are perserved for backward compatibility.
- Remove 'Special Report' feed.
- Some feed continue to use old Wire API due to not available in new one.
- Add some new type of content, replace iframe with blockquote for twitter.
2021-12-08 17:16:40 +01:00
Bockiii
b395fe2641 [core] Implemented feature to read config from environment variables (#2100) 2021-12-03 11:15:08 +05:00
Eugene Molotov
4bc534c80f [FacebookBridge] teromene and logmanoriginal do not maintain this bridge defacto 2021-12-03 05:31:46 +05:00
Eugene Molotov
071fdef599 [core] Drop php 5.6 and php 7.0 support (#2224) 2021-12-03 04:12:16 +05:00
erik
ae6a3227b0 [FlashbackBridge] Add new bridge (#2343) 2021-12-03 03:57:21 +05:00
benzel
f469489b56 [AppleAppStoreBridge] Add Germany (#2350) 2021-12-03 03:56:06 +05:00
dag
490f556783 [TheCodingLoveBridge] Remove redundant bridge (#2342)
This is now a wordpress blog and their official feed is at https://thecodinglove.com/feed
2021-11-29 11:26:13 +05:00
somini
192f0278d2 [PanacheDigitalGamesBridge] Add bridge (#2321) 2021-11-06 23:58:30 +05:00
sysadminstory
2b634002f2 [DealabsBridge - HotUKDealsBridge - MydealsBridge] Set the Feed URL according to the parameters (#2320) 2021-11-06 23:43:44 +05:00
Christian Schabesberger
42379071e9 [NordbayernBridge] Fix banner URL (#2326)
* make banner images show for nordbayern again
* make author portrait not apear as article banner for nordbayern
2021-11-06 23:28:12 +05:00
Joseph
fd54042ef3 [BandcampBridge] Add support for labels (#2286) 2021-10-30 01:43:20 +05:00
Martin Leyrer
3764348b76 [core] Accept additional "successful" 2xx status codes (#2310) 2021-10-30 01:38:25 +05:00
dotter-ak
0ba0e2de4e [UrlebirdBridge] Fix for non ASCII characters in post URI (#2312) 2021-10-30 01:36:09 +05:00
Florent Machen
4187d8f4cf [GitHubGistBridge] fix use the css selector "contains" to find a class in the middle of the utility classes (#2306) 2021-10-30 01:32:31 +05:00
ORelio
1c6532a9d0 [NextgovBridge] Update categories, fix missing element (#2316) 2021-10-30 01:28:02 +05:00
ORelio
547829f971 [FuturaSciences] Improve content extraction (#2317)
- Fix tracking removal in URL
- Fix images broken due to new lazy loading mechanism
- Remove headline, articles do not have it anymore
- Improve article cleanup
2021-10-30 01:24:19 +05:00
ORelio
970bdd45f9 [DarkReadingBridge] Fix content extraction (#2315)
Also:
- Add article limit (main feed was broken due to too many articles)
- Add support for article thumbnail
2021-10-30 01:21:07 +05:00
Eugene Molotov
b86ed70376 [core] Backported str_starts_with, str_ends_with and str_contains from php 8 (#2318) 2021-10-30 01:06:04 +05:00
Eugene Molotov
9254d14f50 [VkBridge] Multiple fixes:
- Correct video title
- Do not add repost of deleted post to feed
2021-10-25 10:16:24 +05:00
Matt DeMoss
8f98e07979 [PcGamerBridge] Use meta tags to generate feed contents (#2271) 2021-10-19 11:53:26 +05:00
Bockiii
8d0fc54e4d [FSecureBlogBridge] Limit number of returned items (#2300) 2021-10-19 08:23:38 +05:00
csisoap
bdf15c3ce0 [UnogsBridge] Add fallback if not found any high-res image (#2301) 2021-10-19 08:22:17 +05:00
sal0max
927b08ed00 [LegoIdeasBridge] Add bridge (#2284)
* [LegoIdeasBridge] Add bridge
2021-10-14 22:52:42 +02:00
Niehztog
87b3aaa550 [XPathAbstract] Fix encoding of feed output (#2297) 2021-10-14 14:18:00 +05:00
Yaman Qalieh
c445ba6ebb [MozillaBugTrackerBridge] Fix incorrect newlines in feed title (#2298) 2021-10-14 14:13:18 +05:00
Bockiii
793c55f43d [Docker] Allow to define port via HTTP_PORT (#2285) 2021-10-09 22:02:38 +05:00
Bockiii
11be390e65 [MozillaSecurityBridge] Limit items to 20 (#2287) 2021-10-09 16:03:12 +05:00
somini
ba5baaf7c9 [JornalDeNoticiasBridge] Add bridge (#2293) 2021-10-07 16:15:21 +05:00
sysadminstory
f0ddd686e3 [ExtremeDownloadBridge] Update URL (#2290) 2021-10-05 12:52:29 +05:00
sysadminstory
f6b9864bdd [ZoneTelechargementBridge] Update website URL (#2289) 2021-10-05 12:51:26 +05:00
KamaleiZestri
64b7c54bc8 [BakaUpdatesMangaReleasesBridge] Added option to display releases based on a user list (#2276)
* [BakaUpdatesMangaReleasesBridge] Added option to display releases based on a user list
2021-10-03 22:35:31 +02:00
KamaleiZestri
d5a010adcd [PillowfortBridge] Added new bridge (#2275)
* [PillowfortBridge] Added new bridge
2021-10-03 21:59:33 +02:00
Bockiii
2a609b39bd [LinkedInBridge] Remove bridge (#2269) 2021-10-03 21:00:24 +05:00
Bockiii
dacc586dca New docker build mechanism (#2268)
* New docker build mechanism
2021-10-03 16:06:30 +02:00
csisoap
8bcf4ebfbf [NationalGeographicBridge] Rewrite bridge (#2177)
- All the option will be preserved.
- Add timestamp, author's name included with full article.
2021-10-01 18:39:36 +05:00
csisoap
cb111a3ebd [UnogsBridge] Better feed title for Country context (#2279) 2021-09-28 14:20:04 +05:00
Timendum
42e40e2823 [PicukiBridge] Fix image URLs in content (#2282)
URLs in Picuki are already absolute
2021-09-28 14:15:41 +05:00
Bockiii
1ddce120ae [EconomistBridge] Full rework (#2272) 2021-09-26 16:25:19 +05:00
Joseph
927cb17dbf [SoundcloudBridge] Add support for albums, reposts & likes (#2236) 2021-09-20 17:53:41 +05:00
D5k H3h
ccb2e64fd0 [WallpaperflareBridge] Add bridge (#2179) 2021-09-11 13:27:17 +05:00
csisoap
a26408594b [YoutubeBridge] New features, fixes and refactors (#2208)
New features:
- Add support for custom channel name.

Fixes:
- In playlist mode last uploaded videos were not in feed
- Search mode returned empty feed

And a lot of refactoring
2021-09-11 13:20:14 +05:00
Bockiii
324932642d [PokemonTVBridge] Add bridge (#2219) 2021-09-05 12:11:36 +05:00
Bockiii
455b5e09a1 [Dockerfile] Add custom config location (#2098) 2021-09-05 08:10:54 +05:00
Bockiii
bcc15228d8 [RedditBridge] Return back NSFW posts to feed (#2257)
As it was working before applying https://github.com/RSS-Bridge/rss-bridge/pull/2229
2021-09-04 18:00:02 +05:00
Eugene Molotov
68d9e2ff24 [NineGagBridge] Remove whitespace on wtf section
Don't know why github actions did not run on https://github.com/RSS-Bridge/rss-bridge/pull/2094
Certainly wtf
2021-08-25 18:16:00 +05:00
Bockiii
a5d33615f5 [RedditBridge] Add keyword search function (#2229) 2021-08-25 18:09:36 +05:00
Christian Schabesberger
8f634eb4a1 [NordBayernBridge] Fix election articles (#2253) 2021-08-25 18:08:23 +05:00
Bockiii
677e4974d1 [NineGagBridge] Updated sections and added video 2021-08-25 18:06:10 +05:00
Joseph
10c5259493 [OpenlyBridge] Add bridge (#2129) 2021-08-15 23:42:28 +05:00
Joseph
cb3c055df9 [InternetArchiveBridge] Add detectParameters (#2142) 2021-08-15 23:36:38 +05:00
Christian Schabesberger
036a3ad245 [NordbayernBridge] Add city of Erlangen (#2248) 2021-08-15 18:57:40 +05:00
Joseph
69ce8106ce [BingSearchBridge] Remove bridge (#2242)
Microsoft has removed the bing search discover functionality.

https://www.bing.com/discover/ pages now redirect to https://www.bing.com/images/trending
2021-08-13 08:54:37 +05:00
ORelio
8a30480a45 [Releases3DSBridge] Remove requests to IGN (#2246)
This part of the bridge was meant to find game info on IGN but rarely found useful results, and is harder to maintain than the rest of this bridge due to changes at IGN.
2021-08-13 08:52:57 +05:00
Joseph
f36832b66e [CodebergBridge] Add bridge (#1951) 2021-08-13 08:51:50 +05:00
t0stiman
f3f934ed8b [HardwareInfoBridge] Add bridge (#2232) 2021-08-10 23:00:32 +05:00
Joseph
7c46c64242 [FierPandaBridge] Remove bridge (#2238) 2021-08-10 22:55:24 +05:00
ORelio
bf1773ed8b [GBAtemp] Fix news extraction (#2241) 2021-08-10 22:49:10 +05:00
Joseph
4529e3699a [BridgeImplementationTest] Allow multiple contexts to have an empty parameters array (#1954) 2021-08-10 22:37:41 +05:00
sysadminstory
f5f0b77805 [RadioMelodieBridge] Replace JS Audio Player (#2233)
The Javascript Audio Player is replaced by the plain <audio> HTML tag
2021-08-04 09:04:45 +05:00
t0stiman
3637777070 [style] add dark mode (#2029) 2021-08-01 16:31:58 +05:00
Tobias Alexander Franke
c673917aca [BinanceBridge] Fix blog posts (#2226) 2021-07-29 21:55:36 +05:00
Eugene Molotov
877707f7b2 [contrib] Add directory for unorganized bin of various useful things contributed by the community around RSS-Bridge
Idea came after reading https://drewdevault.com/2020/06/06/Add-a-contrib-directory.html
2021-07-28 00:51:34 +05:00
sysadminstory
2689f5f7fa [DealabsBridge - HotUKDealsBridge - MydealsBridge] Update groups (#2083)
The bridges has been updated with the newest "groups" available on every website
2021-07-28 00:46:01 +05:00
Bockiii
bf1cb8fadc [IndiegogoBridge] New bridge (#2135) 2021-07-28 00:41:56 +05:00
Eugene Molotov
716f5ddc0e [PikabuBridge] Do not strip strikethrough tags in body content 2021-07-24 00:39:00 +05:00
Eugene Molotov
0ee549f468 [PikabuBridge] Remove whitespace from fake news marker 2021-07-24 00:39:00 +05:00
Eugene Molotov
4a1e26fd07 [WordPressBridge] aledeg is not maintainer of this bridge 2021-07-24 00:37:57 +05:00
sal0max
e14f647075 [SpottschauBridge] New bridge (#2193) 2021-07-20 13:16:43 +05:00
Marcus
34489431b4 [PicukiBridge] New bridge. Alternative to InstagramBridge (#2183) 2021-07-20 13:06:56 +05:00
dotter-ak
126cf1a7fa [Drive2ruBridge] Fixed incorrect titles and URLs in logbooks (#2215) 2021-07-20 13:03:17 +05:00
岳东辰
3050f0ae70 [ARDMediathekBridge] New bridge (#2158) 2021-07-20 12:58:50 +05:00
csisoap
cabf7a748a [ReutersBridge] Change timestamp, add new feed, add alt text to image (#2150) 2021-07-20 12:54:07 +05:00
dotter-ak
84450e7e8d [Drive2ruBridge] Bugfix (#2211) 2021-07-13 10:20:46 +05:00
Joseph
971cd9ba39 [FirefoxAddonsBridge] Remove duplicate code (#2209) 2021-07-12 22:56:51 +05:00
Nemo
9fa782105d [AmazonPriceTrackerBridge] Fixes for subscription items (#2205) 2021-07-12 22:49:29 +05:00
dotter-ak
cb7f5b057f [Drive2ruBridge] Add news, personal blogs and featured topics (#2156) 2021-07-09 00:00:16 +05:00
csisoap
a8d1acfdad [UnogsBridge] New bridge (#2198) 2021-07-07 15:25:13 +05:00
sal0max
b5d9742a21 [NikonDownloadCenterBridge] Add bridge (#2195) 2021-07-06 18:00:19 +05:00
sal0max
7dd1a7dccc [AmazonPriceTrackerBridge] Fix bridge (#2194) 2021-07-06 01:26:08 +05:00
csisoap
1f6ad000ce [RedditBridge] Add option to choose for New, Hot and Top submissions (#2189) 2021-07-02 00:41:56 +05:00
Christian Schabesberger
398e175fe0 [NordbayernBridge] Follow site updates (#2169) 2021-07-01 07:21:58 +05:00
Corentin Garcia
0de2db853f [NYTBridge] Fix article parsing (#2106)
Co-authored-by: podiki <podiki@users.noreply.github.com>
2021-06-30 15:14:25 +05:00
sysadminstory
9399ebb2c6 [RadioMelodieBridge] Add timestamp support and content fix (#2105) 2021-06-26 01:12:33 +05:00
dotter-ak
606972dd3c [UrlebirdBridge] Add bridge (#2163) 2021-06-26 00:55:13 +05:00
Bockiii
ecaae735d9 [core] Support for bridge maintainers' donation URLs (#2102) 2021-06-26 00:45:25 +05:00
岳东辰
5598fef3cf [WikipediaBridge] Update elements (#2167) 2021-06-20 15:23:29 +05:00
triatic
9c99a1a9c1 [FacebookBridge] Increase cache timeout (#2149)
Facebook aggressively throttles queries now
2021-06-12 23:15:56 +05:00
ORelio
75cc52a62c [FilterBridge] Various improvements (#2148)
- Add option for case-insensitive regex
- Allow matching item content or author in addition to item title
- Optionally attempt to convert encoding when applying matches
2021-06-07 23:11:12 +05:00
Eugene Molotov
973e49d93e [TelegramBridge] Add test cases for detectParameters 2021-06-05 09:34:16 +05:00
Eugene Molotov
c580219627 [BridgeImplementationTest] Implement feature for testing detectParameters method 2021-06-05 09:34:16 +05:00
Joseph
a18af3952d [KATBridge] Remove bridge (#2141) 2021-06-03 00:16:12 +05:00
Joseph
15907e2bbd [StoriesIGBridge] Remove bridge (#2139)
Website has been unavailable since at least October 2020

https://web.archive.org/web/20201016100555/https://storiesig.com/
2021-06-01 10:20:11 +05:00
Joseph
459adf4790 [ExplosmBridge] Fix website URI (#2140) 2021-06-01 10:18:14 +05:00
AxorPL
d38bc18232 [Formula1Bridge] Minor fixes (#2128)
- removed useless returnServerError according to your recommendation
- made use of the caption property if present
- fixed link URL
2021-05-30 23:33:15 +05:00
Jacques Heunis
eec1163fb9 [ItchioBridge] Remove reliance on in-page timestamps (#2127)
This significantly increases the possibility of missing updates (if
files are uploaded but no file names or post contents are changed) and
of showing an update when there is none (if the post text is changed
but no new files are uploaded). However with the on-page timestamps
removed I'm not sure if there is a good way to do this more accurately
so this is good as we can do at the moment.
2021-05-30 23:12:19 +05:00
Bockiii
b074abcc0d [AppleMusicBridge] Complete rebuild for new site (#2134) 2021-05-30 23:08:39 +05:00
Joseph
2ae9793f2c [CI] Update ubuntu version (16.04 => 20.04) (#2136)
Support for Ubuntu 16.04 (Xenial Xerus) runners is deprecated and will be removed on August 1, 2021
https://github.com/shivammathur/setup-php/issues/452
2021-05-30 23:04:57 +05:00
Joseph
f02d80e141 [FirefoxAddonsBridge] Fix download link extraction (#2120) 2021-05-25 00:46:07 +05:00
Yaman Qalieh
44e01a4282 [PixivBridge] Rewrite Bridge (#2111)
Also added options:
- Search for Illustrations, Manga or Novels
- Custom Post Limit
- Choose between thumbnails and full-sized image
2021-05-25 00:42:39 +05:00
Eugene Molotov
63d257d9d0 [PikabuBridge] Cut "script" element from post body (#2125)
Also correct description and remove useless returnServerError call
2021-05-24 00:50:24 +05:00
dotter-ak
37cd071453 [Drive2ruBridge] Add bridge (#2116) 2021-05-24 00:33:46 +05:00
Christian Schabesberger
17f9c44bfc [NordbayernBridge] Fix jpeg regex (#2118) 2021-05-19 13:44:17 +05:00
Christian Schabesberger
28aaf59007 [NordbayernBridge] Exclude slideshows when handling articles (#2117) 2021-05-19 13:43:10 +05:00
Corentin Garcia
e8d241e8c9 [CourrierInternationalBridge] Switch to FeedExpander (#2107) 2021-05-17 23:36:11 +05:00
t0stiman
2b793f04de [RaceDepartmentBridge] Follow site changes (#2087) 2021-05-17 23:18:51 +05:00
Eugene Molotov
655e02e3fe [VMwareSecurityBridge] Remove bridge
There is fulltext RSS feed: https://www.vmware.com/security/advisories.xml
2021-05-17 12:01:23 +05:00
Eugene Molotov
a4bd04310f [YoutubeBridge] Several fixes and switch maintainer (#2115)
- Fix incorrectly working method for querying video info
- Partially fix playlist mode.
At least it works, if playlist has more than 15 videos. But maximum 100 video items are parsed from playlist.

Reason of switching maintainer: https://github.com/RSS-Bridge/rss-bridge/issues/2113#issuecomment-841156902
2021-05-17 01:02:45 +05:00
Bockiii
e48617530d [ExplosmBridge] Add bridge (#2092) 2021-05-13 23:35:42 +05:00
Bockiii
3585575d68 [Docker] Add support for arm32/64 (#2104) 2021-05-13 22:57:10 +05:00
somini
e79a02ac2e [PresidenciaPTBridge]: Support multiple sections (#2082) 2021-05-10 00:22:10 +05:00
Bockiii
63ebf5ceec [BridgeCard] Make HTML default, remove other buttons (#2101) 2021-05-08 15:10:16 +05:00
AxorPL
378f78d6eb [Formula1Bridge] New bridge (#2085) 2021-05-06 23:16:22 +05:00
marius851000
d7ba7782f3 [DerpibooruBridge] Make it work again (#2079) 2021-04-26 23:07:42 +05:00
Eugene Molotov
b24b5ed3ee Bump version to dev.2021-04-25 2021-04-25 15:32:35 +05:00
Eugene Molotov
f06a8ae307 [README] Update list of contributors 2021-04-25 15:30:17 +05:00
dawidsowa
4f7ef212b7 [RedditBridge] Add detectParameters (#2070) 2021-04-19 22:17:36 +05:00
dawidsowa
13e9a96cf3 [RedditBridge]: Add score filter (#2045) 2021-04-19 22:14:35 +05:00
ORelio
00a24a98be [NyaaTorrents] Rewrite as Feed Expander (#2073)
NyaaTorrents allows search criteria as URL parameters in RSS feed so we just need to expand feed items
2021-04-19 21:59:51 +05:00
FiveFilters.org
76c38332ee [TwitterBridge] Improve timeline processing for username mode (#1946) 2021-04-12 23:08:38 +05:00
Joseph
65be209a47 [TwitScoopBridge] Remove less than (<) character from item title (#2034) 2021-04-12 23:01:46 +05:00
sysadminstory
146639ffc9 [ZoneTelechargement] Update unprotected URL and Feed URL (#2065)
The unproteced URL has changed again, and has been updated.

The RSS Feed URL is now a link to the Show page and not to the Homepage anymore.
2021-04-12 23:01:09 +05:00
sysadminstory
e1c19461ca [ExtremeDownloadBridge] Feed URL updated (#2066)
The Feed URL is now a link to the TV Show and not the Homepage !
2021-04-12 22:59:16 +05:00
Harvey Christian Pacleb
ff0c7a9013 [GenshinImpactBridge] Use Asia/Shanghai time zone for article dates (#2040) 2021-04-10 13:35:34 +05:00
ORelio
b754d14698 [FeedExpander] Handle Atom enclosures (#2039) 2021-04-04 15:21:15 +05:00
sysadminstory
3423b3bbe1 [ZoneTelechargement] Change URL load method (#2044) 2021-04-04 14:31:48 +05:00
Joseph
5966cc0a9c [TheFarSideBridge] Add bridge (#1484) 2021-04-03 23:31:49 +05:00
Joseph
579bfa669c [WallmineNewsBridge] Add bridge (#2035) 2021-04-02 18:01:51 +05:00
ORelio
d61871a45e [NyaaTorrents] Allow searching by username (#2033) 2021-03-31 10:59:31 +05:00
Eugene Molotov
0c8fabeb11 [PikabuBridge] Marking posts from "Как бы Новости" section, which are funny and deliberately fake (#2032) 2021-03-30 23:06:23 +05:00
Matthieu Rakotojaona
40c84b5dc3 [HackerNewsUserThreads] New bridge (#1902) 2021-03-30 21:56:17 +05:00
Yaman Qalieh
6f75d07456 [GitHubPullRequestBridge] Add new bridge inheriting GithubIssueBridge (#2001) 2021-03-29 22:15:56 +05:00
guigot
b4f809aa44 [MondeDiploBridge] Fix blog article uri (#1961) 2021-03-25 22:15:02 +05:00
Joseph
bcecd70df7 [DownDetectorBridge] Fix bridge (#1957) 2021-03-25 22:02:45 +05:00
Joseph
a6c0874b9a [TwitScoopBridge] Fix encoding of less than character (<) (#2023) 2021-03-21 11:39:01 +05:00
somini
9e6f063cfd [PresidenciaPT]: New Bridge (#2016) 2021-03-17 21:30:47 +05:00
Joseph
f904353fd2 [InternetArchiveBridge] Fix collection links (#1551) 2021-03-16 18:07:04 +05:00
Andrea Draghetti
3aafd44079 [TelegramBridge] Display the name of the attachments (#2003)
Sometimes attachments are posted in Telegram channels without any text. 

The script recognizes a new message but does not report any text, with this commit the file names will also be included in the RSS Feed.
2021-03-16 18:04:07 +05:00
Joseph
75b85f61e7 [BandcampBridge] Fix title extraction on empty band pages (#1966) 2021-03-16 18:00:26 +05:00
Joseph
07e1e8497c [DockerHubBridge] Add detectParameters() (#1996) 2021-03-15 21:54:26 +05:00
Joseph
700813e924 [FirefoxAddonsBridge] Add detectParameters() (#1997) 2021-03-15 21:27:53 +05:00
Joseph
5c011c8d90 [TwitScoopBridge] Add bridge (#2018) 2021-03-15 21:20:02 +05:00
Joseph
8d0d08a4d8 [YeggiBridge] Fix lint error (#2019) 2021-03-15 21:15:01 +05:00
Antoine Turmel
55548dcb5f [YeggiBridge] New bridge (#1910) 2021-03-13 21:57:30 +05:00
Justin Goette
0217b270a7 [README] Fix typo (#2004) 2021-03-10 22:13:41 +05:00
Joseph
2ed34f5ebe [FirefoxAddonsBridge] Set unique id for items (#2007)
Adds unique id for each item using item title.
2021-03-09 11:16:56 +05:00
csisoap
2448ed41c9 [ReutersBridge] Add new wireitem template type (#2006)
and retain the list of parameters
2021-03-09 11:15:48 +05:00
Joseph
b25674b3a0 [HtmlFormat] Use str_ireplace() when creating feed format URLs (#2008)
Fixes feed format URLs not being created with correct format value if html feed URL uses a lowercase format value.
2021-03-08 12:17:12 +05:00
Joseph
2ce1a6365b [README] Update build status badges (#1995) 2021-02-28 18:41:03 +05:00
Joseph
30aeeb2a0c [DockerHubBridge] Add support for official images (#1999) 2021-02-28 18:26:24 +05:00
Joseph
c294a652a3 [TelegramBridge] Add detectParameters() (#1998) 2021-02-28 18:20:44 +05:00
Park0
a5f2175531 [SymfonyCasts] Added new bridge (#2000) 2021-02-28 18:17:54 +05:00
dawidsowa
569276f4ef [RedditBridge]: Add user option (#1943) 2021-02-23 12:08:43 +05:00
Joseph
687eb728d4 [DockerHubBridge] Fix bridge name (#1994) 2021-02-22 15:03:04 +00:00
Monocularity
0521ba5873 [NordbayernBridge] Fixed typo of region "Hilpoltstein" (#1962) 2021-02-21 16:43:23 +00:00
Joseph
3d642971c0 [FirefoxAddonsBridge] Add bridge (#1952) 2021-02-21 17:30:01 +05:00
Shikiryu
8f086169cc [TheYeteeBridge] Fix HTML parsing (#1986) 2021-02-21 15:19:20 +05:00
Joseph
ce34e7eb89 [DockerhubBridge] Add bridge (#1990) 2021-02-21 15:17:07 +05:00
sysadminstory
ee5d190391 [RadioMelodieBridge] Fix header image (#1985)
Header Image is now using a direct link to the image, but without the
website base URL : the bridge now sends the right URL.
2021-02-17 10:07:35 +05:00
Eugene Molotov
98352845a1 [VkBridge] Remove non ascii chars from post date to correctly parse it (#1977) 2021-02-10 18:11:48 +05:00
Joseph
9e58735b01 [FormatFactory] Ignore case in format values (#1967) 2021-02-09 18:13:03 +05:00
Thomas
771b851b52 [contents.php] Fix logical error in getSimpleHTMLDOMCached function (#1974)
Previously content was only loaded from cache when debug mode was enabled (the opposite of the expected behavior)
2021-02-09 17:40:16 +05:00
Joseph
809343ed06 [SoundcloudBridge] Fix client ID extraction (#1973) 2021-02-09 17:33:14 +05:00
Lyra
e9424f6a08 Merge branch 'master' of github.com:RSS-Bridge/rss-bridge 2021-02-07 14:44:36 +01:00
Lyra
e5846c03ba Attempt to fix LeBonCoinBridge 2021-02-07 14:44:28 +01:00
Joseph
6224fbb6a2 [BridgeCard] Display configuration options (if enabled) when bridge has no parameters (#1968)
Updates displayBridgeCard() in BridgeCard to allow configuration options noproxy and cache_timeout to be displayed, if enabled, when a bridge has no parameters in its PARAMETERS array
2021-02-05 10:17:30 +05:00
sysadminstory
eab575dc9d [ZoneTelechargement] Update Direct Download Unprotected URL (#1963) 2021-01-30 18:02:36 +00:00
André Andersson
b56637c833 [BukowskisBridge] Add bridge (#1927) 2021-01-29 23:36:45 +05:00
Simon816
005b22701d [FSecureBlogBridge] Add bridge (#1932) 2021-01-29 23:27:35 +05:00
hollowleviathan
43b7621f45 [ReutersBridge] Add bridge (#1653) 2021-01-29 22:57:40 +05:00
Joseph
ea289a0cea [GithubIssueBridge] Fix issue id and comment id extraction (#1950) 2021-01-27 11:06:59 +05:00
Joseph
43acb555e0 [ChristianDailyReporterBridge] Remove bridge (#1948)
> The time has come for the Christian Daily Reporter to ride off into the sunset. Disrn is here now and it delivers everything CDR did, times ten.

https://christiandailyreporter.com/
2021-01-22 10:20:17 +05:00
Eugene Molotov
3b7e61fb55 [Arte7Bridge] Mitsu is no longer maintainer of the bridge
> That said, please also feel free to remove me as "maintainer" since that's simply no longer reality

https://github.com/RSS-Bridge/rss-bridge/issues/1906#issuecomment-765015048
2021-01-22 09:52:07 +05:00
Corentin Garcia
fbbd6a02c6 [DribbbleBridge] Fix pictures parsing (#1911) 2021-01-20 22:26:15 +05:00
sysadminstory
3534193032 [ZoneTelechargement] Update URL and fix typos (#1936) 2021-01-17 16:32:59 +05:00
sysadminstory
81fc8c89d4 [ExtremeDownloadBridge] Update URL (#1937) 2021-01-17 16:31:44 +05:00
Eugene Molotov
ea1de07fe5 [CI] Fix non-working phpcompatibility job (#1928) 2021-01-12 12:02:49 +05:00
Eugene Molotov
2de5ce8387 [CI] Fix phpcompatibility job running wrong scenario 2021-01-12 11:00:38 +05:00
Eugene Molotov
28f9215913 [CI] Replace Travis CI with Github Actions (#1926)
Travis stopped working again and no answers from support
2021-01-11 22:39:15 +05:00
FiveFilters.org
f927781750 [TwitterBridge] Add option to hide pinned tweet (#1908) 2021-01-10 13:50:06 +05:00
Jacques Heunis
e128ce807a [ItchioBridge] Add bridge (#1918) 2021-01-10 13:30:12 +05:00
Derrick Lee
6b870f0c3e [TwitterBridge] Fix username matching to be case insensitive with noretweet option (#1924) 2021-01-10 13:19:38 +05:00
JimDog546
5ed161943c [InstagramBridge] Remove redundant data collection for sidecar and video (#1920)
getInstagramSidecarData and getInstagramVideoData were unnecessarily calling getSinglePostData to retrieve data already present in collectData's call of getInstagramJSON. getSinglePostData sometimes doesn't retrieve data properly resulting in incomplete post information. Since the information needed is already present, pass it from collectData instead, eliminating the redundant data collection and improving reliability.
2021-01-10 13:14:58 +05:00
Corentin Garcia
1edec1aa45 [GenshinImpactBridge] Add bridge (#1912) 2020-12-30 23:30:02 +05:00
dawidsowa
3c285d50ec [RedditBridge] Rewrite to use JSON (#1781) 2020-12-23 22:42:15 +05:00
Clemens Neubauer
3aae00b56a [HDWallpapersBridge] Fix URLs (#1892) 2020-12-23 22:19:32 +05:00
sysadminstory
21798e8228 [ZoneTelechargement] Add support for Streaming links (#1858) 2020-12-23 22:13:10 +05:00
Eugene Molotov
3226a5e31e [core] Use more correct text to indicate errored response from upstream 2020-12-23 17:49:11 +05:00
Eugene Molotov
59bbc9d2e7 [VkBridge] Several improvements (#1802)
* Improved post author computation
* Show repost sources
* Handle second copy quote
* Fixed incorrect image uri's
2020-12-18 07:58:51 +05:00
Eugene Molotov
2ddd357a62 [JS] Fixed TypeError: textValue is null 2020-12-18 07:51:33 +05:00
Devon Hess
c302bca1e6 [IKWYDBridge] New bridge (#1874) 2020-12-13 16:08:25 +05:00
t0stiman
0b3082609d [RaceDepartmentBridge] added a bridge for racedepartment.com (#1681) 2020-12-13 15:50:54 +05:00
Lyra
810a2503c9 [core] Add configuration for bridges, allowing private bridges (#1343) 2020-12-12 21:05:22 +05:00
Eugene Molotov
56b2c516e4 [InstagramBridge] pauder is defacto not a maintainer of InstagramBridge 2020-12-09 10:47:48 +05:00
Eugene Molotov
fc81bed717 [BridgeAbstract] Correct getIcon method 2020-12-07 21:08:58 +04:00
Tobias Alexander Franke
56eb829a66 [EconomistBridge] Fixes for fetching new page structure (#1836) 2020-11-29 15:31:20 +05:00
Alex Kirk
7705d097e3 [SkimfeedBridge] Add parameter detection (#1877) 2020-11-29 15:28:07 +05:00
Peter Dave Hello
be9df41e07 [Dockerfile] Clean up apt cache, make image smaller (#1880) 2020-11-29 15:18:20 +05:00
Joseph
1e75f9d3d5 [ReporterreBridge + KernelBugTrackerBridge + BastaBridge] Use defaultLinkTo() (#1862) 2020-11-23 23:49:25 +05:00
Eugene Molotov
0755181555 [CeskaTelevizeBridge] Remove executable flag from bridge file 2020-11-19 16:19:46 +05:00
Joseph
e6c73a1fe3 [FlickrBridge] Add filter by media and sort by options (#1758) 2020-11-16 22:33:48 +05:00
David Pedersen
5729e069e9 [AppleMusicBridge] Use title from website (#1855) 2020-11-16 22:15:39 +05:00
David Pedersen
0b494d9c0e [AmazonPriceTrackerBridge] Add support for Swedish Amazon (#1856) 2020-11-16 22:13:23 +05:00
Eugene Molotov
c855d5089f Revert "[TelegramBridge] Prevent double encoding entities (#1182)"
This reverts commit 5e2f0fb626.
2020-11-11 23:31:24 +05:00
dawidsowa
6baf64f29e [Rule34pahealBridge] Use full size image (#1775) 2020-11-11 23:28:12 +05:00
Alex Balgavy
7d4b76be99 [SeznamZpravyBridge] New bridge (#1806) 2020-11-11 22:39:34 +05:00
Eugene Molotov
ff50e4918c Bump version to dev.2020-11-10 2020-11-10 16:26:08 +05:00
Eugene Molotov
8e4d6d8fdb [README] Update list of contributors 2020-11-10 16:24:58 +05:00
ayacoo
cc548b16a8 [HeiseBridge] Check for article (#1790) 2020-11-10 11:14:09 +05:00
Roman Remizov
b66026e241 [TwitterBridge] Add support for querying by list ID (#1834) 2020-11-10 11:12:02 +05:00
Joseph
a23d4bd0e6 [BrutBridge] Add support for Spain edition and health category (#1833) 2020-11-09 18:14:13 +05:00
ymeister
bde4159a9e [README] Add "filter" to Requirements (#1827)
This extension is required by filter_var()
2020-11-08 12:25:06 +05:00
Niehztog
3ad138026d [BridgeXPathAbstract + BlizzardNewsBridge + XPathBridge] Add new abstract class + two example implementations (#1671) 2020-11-08 12:22:41 +05:00
Joshua Coales
d05a8b79fe [contents.php] Fix return type hints (#1824) 2020-11-08 12:19:18 +05:00
Joshua Coales
efe32aad22 [FacebookBridge] Permalink fix (#1838)
Also removing timestamp which does not work
2020-11-06 18:43:10 +05:00
Petr Kolář
0655b3cb39 [MallTvBridge] New bridge (#1819) 2020-10-31 22:05:13 +05:00
csisoap
59082368c7 [BleepingComputerBridge] New bridge (#1815) 2020-10-31 22:01:19 +05:00
msch
c8b2c1bf74 [OpenwrtSecurityBridge] Add new bridge (#1812) 2020-10-31 21:57:29 +05:00
Roliga
b48bc77c22 [TwitchBridge] Switch to unofficial GraphQL API (#1829)
* [TwitchBridge] Switch to unofficial GraphQL API

The GraphQL API that the twitch.tv website uses has a lot more
information available than the official APIs. Hopefully it'll be stable.
2020-10-30 13:50:36 +00:00
Joshua Coales
6af87b2f32 [FacebookBridge] Use touch.facebook.com for groups (#1817) 2020-10-29 08:42:49 +05:00
Eugene Molotov
93cdf5e342 [core] Fixed passive XSS vulnerability
Reference: https://www.openbugbounty.org/reports/1140367/
2020-10-26 15:08:11 +05:00
Joseph
164b407f28 [BridgeCard] Fix parameter layout issue (#1816)
Fixes parameter layout issue on small screens.
2020-10-26 12:11:58 +05:00
ORelio
2714c3d816 [WordPress] Limit feed to 20 items (#1801) 2020-10-21 14:59:04 +05:00
Eugene Molotov
364b5282a3 [GoogleSearch] Use other class for content retreiving (#1803) 2020-10-19 16:22:37 +05:00
Eugene Molotov
5e4f3c351e [NineGagBridge] Lint previous commit 2020-10-15 14:18:46 +05:00
Gregor Santner
a332a5a414 [NineGagBridge] In post URI replace scheme from "http" to "https" 2020-10-15 14:12:54 +05:00
Joshua Coales
45e2f385b3 [FacebookBridge] Handle mobile links and unify host validation (#1789) 2020-10-15 14:08:03 +05:00
Joseph
0a1ff10a52 [KoreusBridge + VarietyBridge] Use HTTPS when fetching feedburner feeds (#1797) 2020-10-15 13:03:51 +05:00
Eugene Molotov
645a8f62c6 [.travis] Fix several phpcs and phpunit errors (#1799) 2020-10-15 12:53:19 +05:00
423 changed files with 37448 additions and 10251 deletions

View File

@@ -1,4 +1,6 @@
.git
!.git/HEAD
!.git/refs/heads/*
.gitattributes
.github/*
.travis.yml

61
.github/workflows/dockerbuild.yml vendored Normal file
View File

@@ -0,0 +1,61 @@
name: Build Image on Commit and Release
on:
push:
branches:
- 'master'
tags:
- '20*'
env:
DOCKERHUB_SLUG: rssbridge/rss-bridge
GHCR_SLUG: ghcr.io/rss-bridge/rss-bridge
jobs:
bake:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2.3.4
-
name: Docker meta
id: docker_meta
uses: docker/metadata-action@v3.5.0
with:
images: |
${{ env.DOCKERHUB_SLUG }}
${{ env.GHCR_SLUG }}
tags: |
type=raw,value=latest
type=sha
type=ref,event=tag,enable=${{ startsWith(github.ref, 'refs/tags/20') }}
type=raw,value=stable,enable=${{ startsWith(github.ref, 'refs/tags/20') }}
-
name: Set up QEMU
uses: docker/setup-qemu-action@v1
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1.6.0
-
name: Login to DockerHub
uses: docker/login-action@v1.10.0
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
-
name: Login to GitHub Container Registry
uses: docker/login-action@v1.10.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Build and push
uses: docker/bake-action@v1.6.0
with:
files: |
./docker-bake.hcl
${{ steps.docker_meta.outputs.bake-file }}
targets: image-all
push: true

27
.github/workflows/documentation.yml vendored Normal file
View File

@@ -0,0 +1,27 @@
name: Documentation
on:
push:
paths:
- 'docs/**'
jobs:
documentation:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
persist-credentials: false
- name: Setup PHP
uses: shivammathur/setup-php@2.17.1
with:
php-version: 8.0
- name: Install dependencies
run: composer global require daux/daux.io
- name: Generate documentation
run: daux generate
- name: Deploy same repository 🚀
uses: JamesIves/github-pages-deploy-action@v4.2.5
with:
folder: "static"
branch: gh-pages

48
.github/workflows/lint.yml vendored Normal file
View File

@@ -0,0 +1,48 @@
name: Lint
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
phpcs:
runs-on: ubuntu-20.04
strategy:
matrix:
php-versions: ['7.1', '7.2', '7.3', '7.4']
steps:
- uses: actions/checkout@v2
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
tools: phpcs
- run: phpcs . --standard=phpcs.xml --warning-severity=0 --extensions=php -p
phpcompatibility:
runs-on: ubuntu-20.04
strategy:
matrix:
php-versions: ['7.1', '7.4']
steps:
- uses: actions/checkout@v2
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
- run: composer global require dealerdirect/phpcodesniffer-composer-installer
- run: composer global require phpcompatibility/php-compatibility
- run: ~/.composer/vendor/bin/phpcs . --standard=phpcompatibility.xml --warning-severity=0 --extensions=php -p
executable_php_files_check:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- run: |
if find -name "*.php" -executable -type f -print -exec false {} +
then
echo 'Good, no executable php scripts found'
else
echo 'Please unmark php scripts above as non-executable'
exit 1
fi

34
.github/workflows/tests.yml vendored Normal file
View File

@@ -0,0 +1,34 @@
name: Tests
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
phpunit7:
runs-on: ubuntu-20.04
strategy:
matrix:
php-versions: ['7.1', '7.2', '7.3']
steps:
- uses: actions/checkout@v2
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
- run: composer global require phpunit/phpunit ^7
- run: phpunit --configuration=phpunit.xml --include-path=lib/
phpunit8:
runs-on: ubuntu-20.04
strategy:
matrix:
php-versions: ['7.3', '7.4', '8.0', '8.1']
steps:
- uses: actions/checkout@v2
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
- run: composer global require phpunit/phpunit ^8
- run: phpunit --configuration=phpunit.xml --include-path=lib/

1
.gitignore vendored
View File

@@ -213,6 +213,7 @@ pip-log.txt
# Unit test / coverage reports
.coverage
.phpunit.result.cache
.tox
#Translations

View File

@@ -1,46 +0,0 @@
dist: trusty
language: php
install:
- composer global require dealerdirect/phpcodesniffer-composer-installer;
- composer global require phpcompatibility/php-compatibility;
- if [[ "$PHPUNIT" ]]; then
composer global require phpunit/phpunit ^$PHPUNIT;
fi
script:
- phpenv rehash
# Run PHP_CodeSniffer on all versions
- ~/.config/composer/vendor/bin/phpcs . --standard=phpcs.xml --warning-severity=0 --extensions=php -p;
# Check PHP compatibility for the lowest and highest supported version
- if [[ $TRAVIS_PHP_VERSION == "5.6" || $TRAVIS_PHP_VERSION == "7.3" ]]; then
~/.config/composer/vendor/bin/phpcs . --standard=phpcompatibility.xml --extensions=php -p;
fi
# Run unit tests on highest major version
- if [[ ${TRAVIS_PHP_VERSION:0:1} == "7" ]]; then
~/.config/composer/vendor/bin/phpunit --configuration=phpunit.xml --include-path=lib/;
fi
php:
- 7.3
env:
- PHPUNIT=6
- PHPUNIT=7
- PHPUNIT=8
matrix:
fast_finish: true
include:
- php: 5.6
env: PHPUNIT=
- php: 7.0
- php: 7.1
- php: 7.2
allow_failures:
- php: 7.3
env: PHPUNIT=7
- php: 7.3
env: PHPUNIT=8

View File

@@ -1,4 +1,8 @@
FROM php:7-apache
FROM php:7-apache-buster
LABEL description="RSS-Bridge is a PHP project capable of generating RSS and Atom feeds for websites that don't have one."
LABEL repository="https://github.com/RSS-Bridge/rss-bridge"
LABEL website="https://github.com/RSS-Bridge/rss-bridge"
ENV APACHE_DOCUMENT_ROOT=/app
@@ -7,6 +11,7 @@ RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini" \
&& apt-get --yes --no-install-recommends install \
zlib1g-dev \
libmemcached-dev \
&& rm -rf /var/lib/apt/lists/* \
&& pecl install memcached \
&& docker-php-ext-enable memcached \
&& sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf \
@@ -14,4 +19,6 @@ RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini" \
&& sed -ri -e 's/(MinProtocol\s*=\s*)TLSv1\.2/\1None/' /etc/ssl/openssl.cnf \
&& sed -ri -e 's/(CipherString\s*=\s*DEFAULT)@SECLEVEL=2/\1/' /etc/ssl/openssl.cnf
COPY --chown=www-data:www-data ./ /app/
COPY --chown=www-data:www-data ./ /app/
CMD ["/app/docker-entrypoint.sh"]

View File

@@ -1,6 +1,11 @@
![RSS-Bridge](static/logo_600px.png)
===
[![LICENSE](https://img.shields.io/badge/license-UNLICENSE-blue.svg)](UNLICENSE) [![GitHub release](https://img.shields.io/github/release/rss-bridge/rss-bridge.svg?logo=github)](https://github.com/rss-bridge/rss-bridge/releases/latest) [![Debian Release](https://img.shields.io/badge/dynamic/json.svg?logo=debian&label=debian%20release&url=https%3A%2F%2Fsources.debian.org%2Fapi%2Fsrc%2Frss-bridge%2F&query=%24.versions%5B0%5D.version&colorB=blue)](https://tracker.debian.org/pkg/rss-bridge) [![Guix Release](https://img.shields.io/badge/guix%20release-unknown-blue.svg)](https://www.gnu.org/software/guix/packages/R/) [![Build Status](https://travis-ci.org/RSS-Bridge/rss-bridge.svg?branch=master)](https://travis-ci.org/RSS-Bridge/rss-bridge) [![Docker Build Status](https://img.shields.io/docker/build/rssbridge/rss-bridge.svg?logo=docker)](https://hub.docker.com/r/rssbridge/rss-bridge/)
[![LICENSE](https://img.shields.io/badge/license-UNLICENSE-blue.svg)](UNLICENSE)
[![GitHub release](https://img.shields.io/github/release/rss-bridge/rss-bridge.svg?logo=github)](https://github.com/rss-bridge/rss-bridge/releases/latest)
[![irc.libera.chat](https://img.shields.io/badge/irc.libera.chat-%23rssbridge-blue.svg)](https://web.libera.chat/#rssbridge)
[![Chat on Matrix](https://matrix.to/img/matrix-badge.svg)](https://matrix.to/#/#rssbridge:libera.chat)
[![Actions Status](https://img.shields.io/github/workflow/status/RSS-Bridge/rss-bridge/Tests/master?label=GitHub%20Actions&logo=github)](https://github.com/RSS-Bridge/rss-bridge/actions)
[![Docker Build Status](https://img.shields.io/docker/cloud/build/rssbridge/rss-bridge?logo=docker)](https://hub.docker.com/r/rssbridge/rss-bridge/)
RSS-Bridge is a PHP project capable of generating RSS and Atom feeds for websites that don't have one. It can be used on webservers or as a stand-alone application in CLI mode.
@@ -13,11 +18,11 @@ Supported sites/pages (examples)
* `Cryptome` : Returns the most recent documents from [Cryptome.org](http://cryptome.org/)
* `DansTonChat`: Most recent quotes from [danstonchat.com](http://danstonchat.com/)
* `DuckDuckGo`: Most recent results from [DuckDuckGo.com](https://duckduckgo.com/)
* `Facebook` : Returns the latest posts on a page or profile on [Facebook](https://facebook.com/)
* `Facebook` : Returns the latest posts on a page or profile on [Facebook](https://facebook.com/) (There is an [issue](https://github.com/RSS-Bridge/rss-bridge/issues/2047) for public instances)
* `FlickrExplore` : [Latest interesting images](http://www.flickr.com/explore) from Flickr
* `GoogleSearch` : Most recent results from Google Search
* `Identi.ca` : Identica user timeline (Should be compatible with other Pump.io instances)
* `Instagram`: Most recent photos from an Instagram user
* `Instagram`: Most recent photos from an Instagram user (There is an [issue](https://github.com/RSS-Bridge/rss-bridge/issues/1891) for public instances)
* `OpenClassrooms`: Lastest tutorials from [fr.openclassrooms.com](http://fr.openclassrooms.com/)
* `Pinterest`: Most recent photos from user or search
* `ScmbBridge`: Newest stories from [secouchermoinsbete.fr](http://secouchermoinsbete.fr/)
@@ -57,7 +62,7 @@ RSS-Bridge hashtag (#rss-bridge) search on Twitter, in Atom format (as displayed
Requirements
===
RSS-Bridge requires PHP 5.6 or higher with following extensions enabled:
RSS-Bridge requires PHP 7.1 or higher with following extensions enabled:
- [`openssl`](https://secure.php.net/manual/en/book.openssl.php)
- [`libxml`](https://secure.php.net/manual/en/book.libxml.php)
@@ -65,6 +70,7 @@ RSS-Bridge requires PHP 5.6 or higher with following extensions enabled:
- [`simplexml`](https://secure.php.net/manual/en/book.simplexml.php)
- [`curl`](https://secure.php.net/manual/en/book.curl.php)
- [`json`](https://secure.php.net/manual/en/book.json.php)
- [`filter`](https://secure.php.net/manual/en/book.filter.php)
- [`sqlite3`](http://php.net/manual/en/book.sqlite3.php) (only when using SQLiteCache)
Find more information on our [Wiki](https://github.com/rss-bridge/rss-bridge/wiki)
@@ -107,36 +113,45 @@ We are RSS-Bridge community, a group of developers continuing the project initia
**Contributors** (sorted alphabetically):
<!--
Use this script to generate the list automatically (using the GitHub API):
https://gist.github.com/LogMANOriginal/da00cd1e5f0ca31cef8e193509b17fd8
./contrib/prepare_release/fetch_contributors.php
-->
* [16mhz](https://github.com/16mhz)
* [86423355844265459587182778](https://github.com/86423355844265459587182778)
* [adamchainz](https://github.com/adamchainz)
* [Ahiles3005](https://github.com/Ahiles3005)
* [akirk](https://github.com/akirk)
* [Albirew](https://github.com/Albirew)
* [aledeg](https://github.com/aledeg)
* [alex73](https://github.com/alex73)
* [alexAubin](https://github.com/alexAubin)
* [AmauryCarrade](https://github.com/AmauryCarrade)
* [AntoineTurmel](https://github.com/AntoineTurmel)
* [arnd-s](https://github.com/arnd-s)
* [ArthurHoaro](https://github.com/ArthurHoaro)
* [Astalaseven](https://github.com/Astalaseven)
* [Astyan-42](https://github.com/Astyan-42)
* [AxorPL](https://github.com/AxorPL)
* [ayacoo](https://github.com/ayacoo)
* [az5he6ch](https://github.com/az5he6ch)
* [azdkj532](https://github.com/azdkj532)
* [b1nj](https://github.com/b1nj)
* [benasse](https://github.com/benasse)
* [Binnette](https://github.com/Binnette)
* [Bockiii](https://github.com/Bockiii)
* [captn3m0](https://github.com/captn3m0)
* [chemel](https://github.com/chemel)
* [Chouchen](https://github.com/Chouchen)
* [ckiw](https://github.com/ckiw)
* [cn-tools](https://github.com/cn-tools)
* [cnlpete](https://github.com/cnlpete)
* [corenting](https://github.com/corenting)
* [couraudt](https://github.com/couraudt)
* [cyberjacob](https://github.com/cyberjacob)
* [csisoap](https://github.com/csisoap)
* [da2x](https://github.com/da2x)
* [dabenzel](https://github.com/dabenzel)
* [Daiyousei](https://github.com/Daiyousei)
* [dawidsowa](https://github.com/dawidsowa)
* [DevonHess](https://github.com/DevonHess)
* [dhuschde](https://github.com/dhuschde)
* [disk0x](https://github.com/disk0x)
* [DJCrashdummy](https://github.com/DJCrashdummy)
* [Djuuu](https://github.com/Djuuu)
@@ -144,32 +159,54 @@ https://gist.github.com/LogMANOriginal/da00cd1e5f0ca31cef8e193509b17fd8
* [dominik-th](https://github.com/dominik-th)
* [Draeli](https://github.com/Draeli)
* [Dreckiger-Dan](https://github.com/Dreckiger-Dan)
* [drego85](https://github.com/drego85)
* [drklee3](https://github.com/drklee3)
* [dvikan](https://github.com/dvikan)
* [em92](https://github.com/em92)
* [eMerzh](https://github.com/eMerzh)
* [EtienneM](https://github.com/EtienneM)
* [f0086](https://github.com/f0086)
* [fanch317](https://github.com/fanch317)
* [fatuuse](https://github.com/fatuuse)
* [fivefilters](https://github.com/fivefilters)
* [floviolleau](https://github.com/floviolleau)
* [fluffy-critter](https://github.com/fluffy-critter)
* [fmachen](https://github.com/fmachen)
* [Frenzie](https://github.com/Frenzie)
* [fulmeek](https://github.com/fulmeek)
* [ggiessen](https://github.com/ggiessen)
* [Ginko-Aloe](https://github.com/Ginko-Aloe)
* [girlpunk](https://github.com/girlpunk)
* [Glandos](https://github.com/Glandos)
* [gloony](https://github.com/gloony)
* [GregThib](https://github.com/GregThib)
* [griffaurel](https://github.com/griffaurel)
* [Grummfy](https://github.com/Grummfy)
* [gsantner](https://github.com/gsantner)
* [guigot](https://github.com/guigot)
* [hollowleviathan](https://github.com/hollowleviathan)
* [hpacleb](https://github.com/hpacleb)
* [hunhejj](https://github.com/hunhejj)
* [husim0](https://github.com/husim0)
* [IceWreck](https://github.com/IceWreck)
* [imagoiq](https://github.com/imagoiq)
* [j0k3r](https://github.com/j0k3r)
* [JackNUMBER](https://github.com/JackNUMBER)
* [jacquesh](https://github.com/jacquesh)
* [JasonGhent](https://github.com/JasonGhent)
* [jcgoette](https://github.com/jcgoette)
* [jdesgats](https://github.com/jdesgats)
* [jdigilio](https://github.com/jdigilio)
* [JeremyRand](https://github.com/JeremyRand)
* [JimDog546](https://github.com/JimDog546)
* [jNullj](https://github.com/jNullj)
* [Jocker666z](https://github.com/Jocker666z)
* [johnnygroovy](https://github.com/johnnygroovy)
* [johnpc](https://github.com/johnpc)
* [killruana](https://github.com/killruana)
* [joni1993](https://github.com/joni1993)
* [KamaleiZestri](https://github.com/KamaleiZestri)
* [klimplant](https://github.com/klimplant)
* [kolarcz](https://github.com/kolarcz)
* [kranack](https://github.com/kranack)
* [kraoc](https://github.com/kraoc)
* [l1n](https://github.com/l1n)
@@ -178,62 +215,98 @@ https://gist.github.com/LogMANOriginal/da00cd1e5f0ca31cef8e193509b17fd8
* [lalannev](https://github.com/lalannev)
* [ldidry](https://github.com/ldidry)
* [Leomaradan](https://github.com/Leomaradan)
* [leyrer](https://github.com/leyrer)
* [liamka](https://github.com/liamka)
* [Limero](https://github.com/Limero)
* [LogMANOriginal](https://github.com/LogMANOriginal)
* [lorenzos](https://github.com/lorenzos)
* [lukasklinger](https://github.com/lukasklinger)
* [m0zes](https://github.com/m0zes)
* [Mar-Koeh](https://github.com/Mar-Koeh)
* [marcus-at-localhost](https://github.com/marcus-at-localhost)
* [marius8510000-bot](https://github.com/marius8510000-bot)
* [matthewseal](https://github.com/matthewseal)
* [mcbyte-it](https://github.com/mcbyte-it)
* [mdemoss](https://github.com/mdemoss)
* [melangue](https://github.com/melangue)
* [metaMMA](https://github.com/metaMMA)
* [mibe](https://github.com/mibe)
* [mightymt](https://github.com/mightymt)
* [mitsukarenai](https://github.com/mitsukarenai)
* [Monocularity](https://github.com/Monocularity)
* [MonsieurPoutounours](https://github.com/MonsieurPoutounours)
* [mr-flibble](https://github.com/mr-flibble)
* [mro](https://github.com/mro)
* [mschwld](https://github.com/mschwld)
* [mxmehl](https://github.com/mxmehl)
* [Mynacol](https://github.com/Mynacol)
* [nel50n](https://github.com/nel50n)
* [niawag](https://github.com/niawag)
* [Niehztog](https://github.com/Niehztog)
* [Nono-m0le](https://github.com/Nono-m0le)
* [ObsidianWitch](https://github.com/ObsidianWitch)
* [OliverParoczai](https://github.com/OliverParoczai)
* [oratosquilla-oratoria](https://github.com/oratosquilla-oratoria)
* [obsiwitch](https://github.com/obsiwitch)
* [Ololbu](https://github.com/Ololbu)
* [ORelio](https://github.com/ORelio)
* [otakuf](https://github.com/otakuf)
* [Park0](https://github.com/Park0)
* [Paroleen](https://github.com/Paroleen)
* [PaulVayssiere](https://github.com/PaulVayssiere)
* [pellaeon](https://github.com/pellaeon)
* [PeterDaveHello](https://github.com/PeterDaveHello)
* [Peterr-K](https://github.com/Peterr-K)
* [Piranhaplant](https://github.com/Piranhaplant)
* [pit-fgfjiudghdf](https://github.com/pit-fgfjiudghdf)
* [pitchoule](https://github.com/pitchoule)
* [pmaziere](https://github.com/pmaziere)
* [Pofilo](https://github.com/Pofilo)
* [prysme01](https://github.com/prysme01)
* [Qluxzz](https://github.com/Qluxzz)
* [quentinus95](https://github.com/quentinus95)
* [rakoo](https://github.com/rakoo)
* [RawkBob](https://github.com/RawkBob)
* [regisenguehard](https://github.com/regisenguehard)
* [Riduidel](https://github.com/Riduidel)
* [rogerdc](https://github.com/rogerdc)
* [Roliga](https://github.com/Roliga)
* [ronansalmon](https://github.com/ronansalmon)
* [rremizov](https://github.com/rremizov)
* [sal0max](https://github.com/sal0max)
* [sebsauvage](https://github.com/sebsauvage)
* [shutosg](https://github.com/shutosg)
* [simon816](https://github.com/simon816)
* [Simounet](https://github.com/Simounet)
* [somini](https://github.com/somini)
* [SpangleLabs](https://github.com/SpangleLabs)
* [squeek502](https://github.com/squeek502)
* [stjohnjohnson](https://github.com/stjohnjohnson)
* [Stopka](https://github.com/Stopka)
* [Strubbl](https://github.com/Strubbl)
* [sublimz](https://github.com/sublimz)
* [sunchaserinfo](https://github.com/sunchaserinfo)
* [SuperSandro2000](https://github.com/SuperSandro2000)
* [sysadminstory](https://github.com/sysadminstory)
* [t0stiman](https://github.com/t0stiman)
* [tameroski](https://github.com/tameroski)
* [teromene](https://github.com/teromene)
* [tgkenney](https://github.com/tgkenney)
* [thefranke](https://github.com/thefranke)
* [ThePadawan](https://github.com/ThePadawan)
* [TheRadialActive](https://github.com/TheRadialActive)
* [theScrabi](https://github.com/theScrabi)
* [thezeroalpha](https://github.com/thezeroalpha)
* [timendum](https://github.com/timendum)
* [TitiTestScalingo](https://github.com/TitiTestScalingo)
* [tomaszkane](https://github.com/tomaszkane)
* [TReKiE](https://github.com/TReKiE)
* [triatic](https://github.com/triatic)
* [VerifiedJoseph](https://github.com/VerifiedJoseph)
* [WalterBarrett](https://github.com/WalterBarrett)
* [wtuuju](https://github.com/wtuuju)
* [xurxof](https://github.com/xurxof)
* [yamanq](https://github.com/yamanq)
* [yardenac](https://github.com/yardenac)
* [ymeister](https://github.com/ymeister)
* [yue-dongchen](https://github.com/yue-dongchen)
* [ZeNairolf](https://github.com/ZeNairolf)
Licenses
@@ -265,6 +338,6 @@ You're not social when you hamper sharing by removing feeds. You're happy to hav
We want to share with friends, using open protocols: RSS, Atom, XMPP, whatever. Because no one wants to have *your* service with *your* applications using *your* API force-feeding them. Friends must be free to choose whatever software and service they want.
We are rebuilding bridges you have wilfully destroyed.
We are rebuilding bridges you have willfully destroyed.
Get your shit together: Put RSS/Atom back in.

View File

@@ -38,6 +38,7 @@ class DisplayAction extends ActionAbstract {
// Data retrieval
$bridge = $bridgeFac->create($bridge);
$bridge->loadConfiguration();
$noproxy = array_key_exists('_noproxy', $this->userData)
&& filter_var($this->userData['_noproxy'], FILTER_VALIDATE_BOOLEAN);
@@ -150,6 +151,7 @@ class DisplayAction extends ActionAbstract {
$infos = array(
'name' => $bridge->getName(),
'uri' => $bridge->getURI(),
'donationUri' => $bridge->getDonationURI(),
'icon' => $bridge->getIcon()
);
} catch(Error $e) {

View File

@@ -39,6 +39,7 @@ class ListAction extends ActionAbstract {
$list->bridges[$bridgeName] = array(
'status' => $status,
'uri' => $bridge->getURI(),
'donationUri' => $bridge->getDonationURI(),
'name' => $bridge->getName(),
'icon' => $bridge->getIcon(),
'parameters' => $bridge->getParameters(),

45
bridges/ABCNewsBridge.php Normal file
View File

@@ -0,0 +1,45 @@
<?php
class ABCNewsBridge extends BridgeAbstract {
const NAME = 'ABC News Bridge';
const URI = 'https://www.abc.net.au';
const DESCRIPTION = 'Topics of the Australian Broadcasting Corporation';
const MAINTAINER = 'yue-dongchen';
const PARAMETERS = array(
array(
'topic' => array(
'type' => 'list',
'name' => 'Region',
'title' => 'Choose state',
'values' => array(
'ACT' => 'act',
'NSW' => 'nsw',
'NT' => 'nt',
'QLD' => 'qld',
'SA' => 'sa',
'TAS' => 'tas',
'VIC' => 'vic',
'WA' => 'wa'
),
)
)
);
public function collectData() {
$url = 'https://www.abc.net.au/news/' . $this->getInput('topic');
$html = getSimpleHTMLDOM($url)->find('.YAJzu._2FvRw.ZWhbj._3BZxh', 0);
$html = defaultLinkTo($html, $this->getURI());
foreach($html->find('._2H7Su') as $article) {
$item = array();
$title = $article->find('._3T9Id.fmhNa.nsZdE._2c2Zy._1tOey._3EOTW', 0);
$item['title'] = $title->plaintext;
$item['uri'] = $title->href;
$item['content'] = $article->find('.rMkro._1cBaI._3PhF6._10YQT._1yL-m', 0)->plaintext;
$item['timestamp'] = strtotime($article->find('time', 0)->datetime);
$this->items[] = $item;
}
}
}

View File

@@ -12,8 +12,7 @@ class AO3Bridge extends BridgeAbstract {
'name' => 'url',
'required' => true,
// Example: F/F tag, complete works only
'exampleValue' => self::URI
. 'works?work_search[complete]=T&tag_id=F*s*F',
'exampleValue' => 'https://archiveofourown.org/works?work_search[complete]=T&tag_id=F*s*F',
),
),
'Bookmarks' => array(
@@ -37,8 +36,7 @@ class AO3Bridge extends BridgeAbstract {
// Feed for lists of works (e.g. recent works, search results, filtered tags,
// bookmarks, series, collections).
private function collectList($url) {
$html = getSimpleHTMLDOM($url)
or returnServerError('could not request AO3');
$html = getSimpleHTMLDOM($url);
$html = defaultLinkTo($html, self::URI);
foreach($html->find('.index.group > li') as $element) {
@@ -65,8 +63,7 @@ class AO3Bridge extends BridgeAbstract {
// Feed for recent chapters of a specific work.
private function collectWork($id) {
$url = self::URI . "/works/$id/navigate";
$html = getSimpleHTMLDOM($url)
or returnServerError('could not request AO3');
$html = getSimpleHTMLDOM($url);
$html = defaultLinkTo($html, self::URI);
$this->title = $html->find('h2 a', 0)->plaintext;

View File

@@ -0,0 +1,95 @@
<?php
class ARDMediathekBridge extends BridgeAbstract {
const NAME = 'ARD-Mediathek Bridge';
const URI = 'https://www.ardmediathek.de';
const DESCRIPTION = 'Feed of any series in the ARD-Mediathek, specified by its path';
const MAINTAINER = 'yue-dongchen';
/*
* Number of Items to be requested from ARDmediathek API
* 12 has been observed on the wild
* 29 is the highest successfully tested value
* More Items could be fetched via pagination
* The JSON-field pagination holds more information on that
* @const PAGESIZE number of requested items
*/
const PAGESIZE = 29;
/*
* The URL Prefix of the (Webapp-)API
* @const APIENDPOINT https-URL of the used endpoint
*/
const APIENDPOINT = 'https://api.ardmediathek.de/page-gateway/widgets/ard/asset/';
/*
* The URL prefix of the video link
* URLs from the webapp include a slug containing titles of show, episode, and tv station.
* It seems to work without that.
* @const VIDEOLINKPREFIX https-URL prefix of video links
*/
const VIDEOLINKPREFIX = 'https://www.ardmediathek.de/video/';
/*
* The requested width of the preview image
* 432 has been observed on the wild
* The webapp seems to also compute and add the height value
* It seems to works without that.
* @const IMAGEWIDTH width in px of the preview image
*/
const IMAGEWIDTH = 432;
/*
* Placeholder that will be replace by IMAGEWIDTH in the preview image URL
* @const IMAGEWIDTHPLACEHOLDER
*/
const IMAGEWIDTHPLACEHOLDER = '{width}';
const PARAMETERS = array(
array(
'path' => array(
'name' => 'Show Link or ID',
'required' => true,
'title' => 'Link to the show page or just its alphanumeric suffix',
'defaultValue' => 'https://www.ardmediathek.de/sendung/45-min/Y3JpZDovL25kci5kZS8xMzkx/'
)
)
);
public function collectData() {
$oldTz = date_default_timezone_get();
date_default_timezone_set('Europe/Berlin');
$pathComponents = explode('/', $this->getInput('path'));
if (empty($pathComponents)) {
returnClientError('Path may not be empty');
}
if (count($pathComponents) < 2) {
$showID = $pathComponents[0];
} else {
$lastKey = count($pathComponents) - 1;
$showID = $pathComponents[$lastKey];
if (strlen($showID) === 0) {
$showID = $pathComponents[$lastKey - 1];
}
}
$url = SELF::APIENDPOINT . $showID . '/?pageSize=' . SELF::PAGESIZE;
$rawJSON = getContents($url);
$processedJSON = json_decode($rawJSON);
foreach($processedJSON->teasers as $video) {
$item = array();
// there is also ->links->self->id, ->links->self->urlId, ->links->target->id, ->links->target->urlId
$item['uri'] = SELF::VIDEOLINKPREFIX . $video->id . '/';
// there is also ->mediumTitle and ->shortTitle
$item['title'] = $video->longTitle;
// in the test, aspect16x9 was the only child of images, not sure whether that is always true
$item['enclosures'] = array(
str_replace(SELF::IMAGEWIDTHPLACEHOLDER, SELF::IMAGEWIDTH, $video->images->aspect16x9->src)
);
$item['content'] = '<img src="' . $item['enclosures'][0] . '" /><p>';
$item['timestamp'] = $video->broadcastedOn;
$item['uid'] = $video->id;
$item['author'] = $video->publicationService->name;
$this->items[] = $item;
}
date_default_timezone_set($oldTz);
}
}

View File

@@ -10,8 +10,7 @@ class ASRockNewsBridge extends BridgeAbstract {
public function collectData() {
$html = getSimpleHTMLDOM(self::URI . '/news/index.asp')
or returnServerError('Could not request: ' . self::URI . '/news/index.asp');
$html = getSimpleHTMLDOM(self::URI . '/news/index.asp');
$html = defaultLinkTo($html, self::URI . '/news/');
@@ -20,17 +19,16 @@ class ASRockNewsBridge extends BridgeAbstract {
$articlePath = $a->href;
$articlePageHtml = getSimpleHTMLDOMCached($articlePath, self::CACHE_TIMEOUT)
or returnServerError('Could not request: ' . $articlePath);
$articlePageHtml = getSimpleHTMLDOMCached($articlePath, self::CACHE_TIMEOUT);
$articlePageHtml = defaultLinkTo($articlePageHtml, self::URI);
$contents = $articlePageHtml->find('div.Contents', 0);
$item['uri'] = $articlePath;
$item['title'] = $contents->find('h5', 0)->innertext;
$item['title'] = $contents->find('h3', 0)->innertext;
$contents->find('h5', 0)->outertext = '';
$contents->find('h3', 0)->outertext = '';
$item['content'] = $contents->innertext;
$item['timestamp'] = $this->extractDate($a->plaintext);

View File

@@ -3,7 +3,7 @@ class AcrimedBridge extends FeedExpander {
const MAINTAINER = 'qwertygc';
const NAME = 'Acrimed Bridge';
const URI = 'http://www.acrimed.org/';
const URI = 'https://www.acrimed.org/';
const CACHE_TIMEOUT = 4800; //2hours
const DESCRIPTION = 'Returns the newest articles';

View File

@@ -10,13 +10,8 @@ class AlbionOnlineBridge extends BridgeAbstract {
const PARAMETERS = array( array(
'postcount' => array(
'name' => 'Limit',
'type' => 'list',
'values' => array(
'2' => 2,
'5' => 5,
'10' => 10,
'15' => 15,
),
'type' => 'number',
'required' => true,
'title' => 'Maximum number of items to return',
'defaultValue' => 5,
),
@@ -48,8 +43,7 @@ class AlbionOnlineBridge extends BridgeAbstract {
// Example: https://albiononline.com/en/changelog/1/5
$url = $api . $this->getInput('language') . '/changelog/1/' . $this->getInput('postcount');
$html = getSimpleHTMLDOM($url)
or returnServerError('Unable to get changelog data from "' . $url . '"!');
$html = getSimpleHTMLDOM($url);
foreach ($html->find('li') as $data) {
$item = array();
@@ -72,8 +66,7 @@ class AlbionOnlineBridge extends BridgeAbstract {
}
private function getFullChangelog($url) {
$html = getSimpleHTMLDOMCached($url)
or returnServerError('Unable to load changelog post from "' . $url . '"!');
$html = getSimpleHTMLDOMCached($url);
$html = defaultLinkTo($html, self::URI);
return $html->find('div.small-12.columns', 1)->innertext;
}

View File

@@ -4,7 +4,7 @@ class AllocineFRBridge extends BridgeAbstract {
const MAINTAINER = 'superbaillot.net';
const NAME = 'Allo Cine Bridge';
const CACHE_TIMEOUT = 25200; // 7h
const URI = 'http://www.allocine.fr/';
const URI = 'https://www.allocine.fr/';
const DESCRIPTION = 'Bridge for allocine.fr';
const PARAMETERS = array( array(
'category' => array(
@@ -77,8 +77,7 @@ class AllocineFRBridge extends BridgeAbstract {
public function collectData(){
$html = getSimpleHTMLDOM($this->getURI())
or returnServerError('Could not request ' . $this->getURI() . ' !');
$html = getSimpleHTMLDOM($this->getURI());
$category = array_search(
$this->getInput('category'),

View File

@@ -12,6 +12,7 @@ class AmazonBridge extends BridgeAbstract {
'q' => array(
'name' => 'Keyword',
'required' => true,
'exampleValue' => 'watch',
),
'sort' => array(
'name' => 'Sort by',
@@ -61,8 +62,7 @@ class AmazonBridge extends BridgeAbstract {
$uri = 'https://www.amazon.' . $this->getInput('tld') . '/';
$uri .= 's/?field-keywords=' . urlencode($this->getInput('q')) . '&sort=' . $this->getInput('sort');
$html = getSimpleHTMLDOM($uri)
or returnServerError('Could not request Amazon.');
$html = getSimpleHTMLDOM($uri);
foreach($html->find('li.s-result-item') as $element) {

View File

@@ -1,7 +1,7 @@
<?php
class AmazonPriceTrackerBridge extends BridgeAbstract {
const MAINTAINER = 'captn3m0';
const MAINTAINER = 'captn3m0, sal0max';
const NAME = 'Amazon Price Tracker';
const URI = 'https://www.amazon.com/';
const CACHE_TIMEOUT = 3600; // 1h
@@ -32,6 +32,7 @@ class AmazonPriceTrackerBridge extends BridgeAbstract {
'Mexico' => 'com.mx',
'Netherlands' => 'nl',
'Spain' => 'es',
'Sweden' => 'se',
'United Kingdom' => 'co.uk',
'United States' => 'com',
),
@@ -39,6 +40,15 @@ class AmazonPriceTrackerBridge extends BridgeAbstract {
),
));
const PRICE_SELECTORS = array(
'#priceblock_ourprice',
'.priceBlockBuyingPriceString',
'#newBuyBoxPrice',
'#tp_price_block_total_price_ww',
'span.offer-price',
'.a-color-price',
);
protected $title;
/**
@@ -53,7 +63,7 @@ class AmazonPriceTrackerBridge extends BridgeAbstract {
*/
public function getURI() {
if (!is_null($this->getInput('asin'))) {
return $this->getDomainName() . '/dp/' . $this->getInput('asin') . '/';
return $this->getDomainName() . '/dp/' . $this->getInput('asin');
}
return parent::getURI();
}
@@ -145,14 +155,30 @@ EOT;
}
private function scrapePriceGeneric($html) {
$priceDiv = $html->find('span.offer-price', 0) ?: $html->find('.a-color-price', 0);
$priceDiv = null;
preg_match('/^\s*([A-Z]{3}|£|\$)\s?([\d.,]+)\s*$/', $priceDiv->plaintext, $matches);
foreach(self::PRICE_SELECTORS as $sel) {
$priceDiv = $html->find($sel, 0);
if ($priceDiv) {
break;
}
}
if (count($matches) === 3) {
if (!$priceDiv) {
return false;
}
$priceString = $priceDiv->plaintext;
preg_match('/[\d.,]+/', $priceString, $matches);
$price = $matches[0];
$currency = trim(str_replace($price, '', $priceString), " \t\n\r\0\x0B\xC2\xA0");
if ($price != null && $currency != null) {
return array(
'price' => $matches[2],
'currency' => $matches[1],
'price' => $price,
'currency' => $currency,
'shipping' => '0'
);
}
@@ -175,6 +201,8 @@ EOT;
'title' => $this->title,
'uri' => $this->getURI(),
'content' => "$imageTag<br/>Price: {$data['price']} {$data['currency']}",
// This is to ensure that feed readers notice the price change
'uid' => md5($data['price'])
);
if ($data['shipping'] !== '0') {

View File

@@ -142,8 +142,7 @@ class AnidexBridge extends BridgeAbstract {
$opt[CURLOPT_SSL_VERIFYPEER] = 0;
// Retrieve torrent listing from search results, which does not contain torrent description
$html = getSimpleHTMLDOM($search_url, $headers, $opt)
or returnServerError('Could not request Anidex: ' . $search_url);
$html = getSimpleHTMLDOM($search_url, $headers, $opt);
$links = $html->find('a');
$results = array();
foreach ($links as $link)

View File

@@ -39,8 +39,7 @@ class AnimeUltimeBridge extends BridgeAbstract {
//Retrive page contents
$url = self::URI . 'history-0-1/' . $requestFilter;
$html = getSimpleHTMLDOM($url)
or returnServerError('Could not request Anime-Ultime: ' . $url);
$html = getSimpleHTMLDOM($url);
//Relases are sorted by day : process each day individually
foreach($html->find('div.history', 0)->find('h3') as $daySection) {
@@ -87,8 +86,7 @@ class AnimeUltimeBridge extends BridgeAbstract {
if(!empty($item_uri)) {
// Retrieve description from description page
$html_item = getContents($item_uri)
or returnServerError('Could not request Anime-Ultime: ' . $item_uri);
$html_item = getContents($item_uri);
$item_description = substr(
$html_item,
strpos($html_item, 'class="principal_contain" align="center">') + 41

View File

@@ -35,7 +35,8 @@ class AppleAppStoreBridge extends BridgeAbstract {
'values' => array(
'US' => 'US',
'India' => 'IN',
'Canada' => 'CA'
'Canada' => 'CA',
'Germany' => 'DE',
),
'defaultValue' => 'US',
),

View File

@@ -4,59 +4,52 @@ class AppleMusicBridge extends BridgeAbstract {
const NAME = 'Apple Music';
const URI = 'https://www.apple.com';
const DESCRIPTION = 'Fetches the latest releases from an artist';
const MAINTAINER = 'Limero';
const MAINTAINER = 'bockiii';
const PARAMETERS = array(array(
'url' => array(
'name' => 'Artist URL',
'exampleValue' => 'https://itunes.apple.com/us/artist/dunderpatrullen/329796274',
'artist' => array(
'name' => 'Artist ID',
'exampleValue' => '909253',
'required' => true,
),
'imgSize' => array(
'name' => 'Image size for thumbnails (in px)',
'type' => 'number',
'defaultValue' => 512,
'limit' => array(
'name' => 'Latest X Releases (max 50)',
'defaultValue' => '10',
'required' => true,
)
),
));
const CACHE_TIMEOUT = 21600; // 6 hours
public function collectData() {
$url = $this->getInput('url');
$html = getSimpleHTMLDOM($url)
or returnServerError('Could not request: ' . $url);
# Limit the amount of releases to 50
if ($this->getInput('limit') > 50) {
$limit = 50;
} else {
$limit = $this->getInput('limit');
}
$imgSize = $this->getInput('imgSize');
$url = 'https://itunes.apple.com/lookup?id='
. $this->getInput('artist')
. '&entity=album&limit='
. $limit .
'&sort=recent';
$html = getSimpleHTMLDOM($url);
// Grab the json data from the page
$html = $html->find('script[id=shoebox-ember-data-store]', 0);
$html = strstr($html, '{');
$html = substr($html, 0, -9);
$json = json_decode($html);
// Loop through each object
foreach ($json->included as $obj) {
if ($obj->type === 'lockup/album') {
foreach ($json->results as $obj) {
if ($obj->wrapperType === 'collection') {
$this->items[] = array(
'title' => $obj->attributes->artistName . ' - ' . $obj->attributes->name,
'uri' => $obj->attributes->url,
'timestamp' => $obj->attributes->releaseDate,
'enclosures' => $obj->relationships->artwork->data->id,
'title' => $obj->artistName . ' - ' . $obj->collectionName,
'uri' => $obj->collectionViewUrl,
'timestamp' => $obj->releaseDate,
'enclosures' => $obj->artworkUrl100,
'content' => '<a href=' . $obj->collectionViewUrl
. '><img src="' . $obj->artworkUrl100 . '" /></a><br><br>'
. $obj->artistName . ' - ' . $obj->collectionName
. '<br>'
. $obj->copyright,
);
} elseif ($obj->type === 'image') {
$images[$obj->id] = $obj->attributes->url;
}
}
// Add the images to each item
foreach ($this->items as &$item) {
$item['enclosures'] = array(
str_replace('{w}x{h}bb.{f}', $imgSize . 'x0w.jpg', $images[$item['enclosures']]),
);
}
// Sort the order to put the latest albums first
usort($this->items, function($a, $b){
return $a['timestamp'] < $b['timestamp'];
});
}
}

View File

@@ -10,7 +10,8 @@ class ArtStationBridge extends BridgeAbstract {
'Search Query' => array(
'q' => array(
'name' => 'Search term',
'required' => true
'required' => true,
'exampleValue' => 'bird'
)
)
);
@@ -39,15 +40,13 @@ class ArtStationBridge extends BridgeAbstract {
);
$jsonSearchURL = self::URI . '/api/v2/search/projects.json';
$jsonSearchStr = getContents($jsonSearchURL, $header, $opts)
or returnServerError('Could not fetch JSON for search query.');
$jsonSearchStr = getContents($jsonSearchURL, $header, $opts);
return json_decode($jsonSearchStr);
}
private function fetchProject($hashID) {
$jsonProjectURL = self::URI . '/projects/' . $hashID . '.json';
$jsonProjectStr = getContents($jsonProjectURL)
or returnServerError('Could not fetch JSON for project.');
$jsonProjectStr = getContents($jsonProjectURL);
return json_decode($jsonProjectStr);
}

View File

@@ -1,7 +1,7 @@
<?php
class Arte7Bridge extends BridgeAbstract {
const MAINTAINER = 'mitsukarenai';
// const MAINTAINER = 'mitsukarenai';
const NAME = 'Arte +7';
const URI = 'https://www.arte.tv/';
const CACHE_TIMEOUT = 1800; // 30min
@@ -32,7 +32,8 @@ class Arte7Bridge extends BridgeAbstract {
'colfr' => array(
'name' => 'Collection id',
'required' => true,
'title' => 'ex. RC-014095 pour https://www.arte.tv/fr/videos/RC-014095/blow-up/'
'title' => 'ex. RC-014095 pour https://www.arte.tv/fr/videos/RC-014095/blow-up/',
'exampleValue' => 'RC-014095'
)
),
'Catégorie (Allemand)' => array(
@@ -57,7 +58,8 @@ class Arte7Bridge extends BridgeAbstract {
'colde' => array(
'name' => 'Collection id',
'required' => true,
'title' => 'ex. RC-014095 pour https://www.arte.tv/de/videos/RC-014095/blow-up/'
'title' => 'ex. RC-014095 pour https://www.arte.tv/de/videos/RC-014095/blow-up/',
'exampleValue' => 'RC-014095'
)
)
);
@@ -91,8 +93,7 @@ class Arte7Bridge extends BridgeAbstract {
'Authorization: Bearer ' . self::API_TOKEN
);
$input = getContents($url, $header)
or returnServerError('Could not request ARTE.');
$input = getContents($url, $header);
$input_json = json_decode($input, true);
foreach($input_json['videos'] as $element) {

View File

@@ -26,7 +26,7 @@ class AsahiShimbunAJWBridge extends BridgeAbstract {
'Opinion » Editorial' => 'opinion/editorial',
'Opinion » Vox Populi' => 'opinion/vox',
),
'defaultValue' => 'Politics',
'defaultValue' => 'politics',
)
)
);
@@ -36,8 +36,7 @@ class AsahiShimbunAJWBridge extends BridgeAbstract {
}
public function collectData() {
$html = getSimpleHTMLDOM($this->getSectionURI($this->getInput('section')))
or returnServerError('Could not load content');
$html = getSimpleHTMLDOM($this->getSectionURI($this->getInput('section')));
foreach($html->find('#MainInner li a') as $element) {
if ($element->parent()->class == 'HeadlineTopImage-S') {

View File

@@ -10,14 +10,14 @@ class AskfmBridge extends BridgeAbstract {
'Ask.fm username' => array(
'u' => array(
'name' => 'Username',
'required' => true
'required' => true,
'exampleValue' => 'ApprovedAndReal'
)
)
);
public function collectData(){
$html = getSimpleHTMLDOM($this->getURI())
or returnServerError('Requested username can\'t be found.');
$html = getSimpleHTMLDOM($this->getURI());
$html = defaultLinkTo($html, self::URI);

View File

@@ -29,8 +29,7 @@ class AtmoNouvelleAquitaineBridge extends BridgeAbstract {
public function collectData() {
$uri = self::URI . '/monair/commune/' . $this->getInput('cities');
$html = getSimpleHTMLDOM($uri)
or returnServerError('Could not request ' . $uri);
$html = getSimpleHTMLDOM($uri);
$this->dom = $html->find('#block-system-main .city-prevision-map', 0);

View File

@@ -8,7 +8,8 @@ class AtmoOccitanieBridge extends BridgeAbstract {
const PARAMETERS = array(array(
'city' => array(
'name' => 'Ville',
'required' => true
'required' => true,
'exampleValue' => 'cahors'
)
));
const CACHE_TIMEOUT = 7200;
@@ -16,8 +17,7 @@ class AtmoOccitanieBridge extends BridgeAbstract {
public function collectData() {
$uri = self::URI . $this->getInput('city');
$html = getSimpleHTMLDOM($uri)
or returnServerError('Could not request ' . $uri);
$html = getSimpleHTMLDOM($uri);
$generalMessage = $html->find('.landing-ville .city-banner .iqa-avertissement', 0)->innertext;
$recommendationsDom = $html->find('.landing-ville .recommandations', 0);

View File

@@ -7,51 +7,14 @@ class AutoJMBridge extends BridgeAbstract {
const DESCRIPTION = 'Suivre les offres de véhicules proposés par AutoJM en fonction des critères de filtrages';
const MAINTAINER = 'sysadminstory';
const PARAMETERS = array(
'Afficher les offres de véhicules disponible en fonction des critères du site AutoJM' => array(
'Afficher les offres de véhicules disponible sur la recheche AutoJM' => array(
'url' => array(
'name' => 'URL du modèle',
'name' => 'URL de la page de recherche',
'type' => 'text',
'required' => true,
'title' => 'URL d\'une recherche avec filtre de véhicules sans le http://www.autojm.fr/',
'exampleValue' => 'achat-voitures-neuves-peugeot-nouvelle-308-5p'
'exampleValue' => 'recherche?brands[]=peugeot&ranges[]=peugeot-nouvelle-308-2021-5p'
),
'energy' => array(
'name' => 'Carburant',
'type' => 'list',
'values' => array(
'-' => '',
'Diesel' => 1,
'Essence' => 3,
'Hybride' => 5
),
'title' => 'Carburant'
),
'transmission' => array(
'name' => 'Transmission',
'type' => 'list',
'values' => array(
'-' => '',
'Automatique' => 1,
'Manuelle' => 2
),
'title' => 'Transmission'
),
'priceMin' => array(
'name' => 'Prix minimum',
'type' => 'number',
'required' => false,
'title' => 'Prix minimum du véhicule',
'exampleValue' => '10000',
'defaultValue' => '0'
),
'priceMax' => array(
'name' => 'Prix maximum',
'type' => 'number',
'required' => false,
'title' => 'Prix maximum du véhicule',
'exampleValue' => '15000',
'defaultValue' => '150000'
)
)
);
const CACHE_TIMEOUT = 3600;
@@ -62,10 +25,8 @@ class AutoJMBridge extends BridgeAbstract {
public function getName() {
switch($this->queriedContext) {
case 'Afficher les offres de véhicules disponible en fonction des critères du site AutoJM':
$html = getSimpleHTMLDOMCached(self::URI . $this->getInput('url'), 86400);
$name = html_entity_decode($html->find('title', 0)->plaintext);
return $name;
case 'Afficher les offres de véhicules disponible sur la recheche AutoJM':
return 'AutoJM | Recherche de véhicules';
break;
default:
return parent::getName();
@@ -75,13 +36,8 @@ class AutoJMBridge extends BridgeAbstract {
public function collectData() {
$model_url = self::URI . $this->getInput('url');
// Build the GET data
$get_data = 'form[energy]=' . $this->getInput('energy') .
'&form[transmission]=' . $this->getInput('transmission') .
'&form[priceMin]=' . $this->getInput('priceMin') .
'&form[priceMin]=' . $this->getInput('priceMin');
// Get the number of result for this search
$search_url = self::URI . $this->getInput('url') . '&open=energy&onlyFilters=false';
// Set the header 'X-Requested-With' like the website does it
$header = array(
@@ -89,57 +45,91 @@ class AutoJMBridge extends BridgeAbstract {
);
// Get the JSON content of the form
$json = getContents($model_url . '?' . $get_data, $header)
or returnServerError('Could not request AutoJM.');
$json = getContents($search_url, $header);
// Extract the HTML content from the JSON result
$data = json_decode($json);
$html = str_get_html($data->results);
// Go through every car of the model
$list = $html->find('div[class=car-card]');
foreach ($list as $car) {
$nb_results = $data->nbResults;
$total_pages = ceil($nb_results / 15);
// Get the Finish name if this car is the first of a new finish
$prev_tag = $car->prev_sibling();
if($prev_tag->tag == 'div' && $prev_tag->class == 'results-title') {
$finish_name = $prev_tag->plaintext;
// Limit the number of page to analyse to 10
for($page = 1; $page <= $total_pages && $page <= 10; $page++) {
// Get the result the next page
$html = $this->getResults($page);
// Go through every car of the search
$list = $html->find('div[class*=card-car card-car--listing]');
foreach ($list as $car) {
// Get the info about the car offer
$image = $car->find('div[class=card-car__header__img]', 0)->find('img', 0)->src;
// Decode HTML attribute JSON data
$car_data = json_decode(html_entity_decode($car->{'data-layer'}));
$car_model = $car->{'data-title'} . ' ' . $car->{'data-suptitle'};
$availability = $car->find('div[class=card-car__modalites]', 0)->find('div[class=col]', 0)->plaintext;
$warranty = $car->find('div[data-type=WarrantyCard]', 0)->plaintext;
$discount_html = $car->find('div[class=subtext vehicle_reference_element]', 0);
// Check if there is any discount info displayed
if ($discount_html != null) {
$reference_price_value = $discount_html->find('span[data-cfg=vehicle__reference_price]', 0)->plaintext;
$discount_percent_value = $discount_html->find('span[data-cfg=vehicle__discount_percent]', 0)->plaintext;
$reference_price = '<li>Prix de référence : <s>' . $reference_price_value . '</s></li>';
$discount_percent = '<li>Réduction : ' . $discount_percent_value . ' %</li>';
} else {
$reference_price = '';
$discount_percent = '';
}
$price = $car_data->price;
$kilometer = $car->find('span[data-cfg=vehicle__kilometer]', 0)->plaintext;
$energy = $car->find('span[data-cfg=vehicle__energy__label]', 0)->plaintext;
$power = $car->find('span[data-cfg=vehicle__tax_horse_power]', 0)->plaintext;
$seats = $car->find('span[data-cfg=vehicle__seats]', 0)->plaintext;
$doors = $car->find('span[data-cfg=vehicle__door__label]', 0)->plaintext;
$transmission = $car->find('span[data-cfg=vehicle__transmission]', 0)->plaintext;
$loa_html = $car->find('span[data-cfg=vehicle__loa]', 0);
// Check if any LOA price is displayed
if($loa_html != null) {
$loa_value = $car->find('span[data-cfg=vehicle__loa]', 0)->plaintext;
$loa = '<li>LOA : à partir de ' . $loa_value . ' / mois </li>';
} else {
$loa = '';
}
// Construct the new item
$item = array();
$item['title'] = $car_model;
$item['content'] = '<p><img style="vertical-align:middle ; padding: 10px" src="' . $image . '" />'
. $car_model . '</p>';
$item['content'] .= '<ul><li>Disponibilité : ' . $availability . '</li>';
$item['content'] .= '<li>Prix : ' . $price . ' €</li>';
$item['content'] .= $reference_price;
$item['content'] .= $loa;
$item['content'] .= $discount_percent;
$item['content'] .= '<li>Garantie : ' . $warranty . '</li>';
$item['content'] .= '<li>Kilométrage : ' . $kilometer . ' km</li>';
$item['content'] .= '<li>Energie : ' . $energy . '</li>';
$item['content'] .= '<li>Puissance: ' . $power . ' CV Fiscaux</li>';
$item['content'] .= '<li>Nombre de Places : ' . $seats . ' place(s)</li>';
$item['content'] .= '<li>Nombre de portes : ' . $doors . '</li>';
$item['content'] .= '<li>Boite de vitesse : ' . $transmission . '</li></ul>';
$item['uri'] = $car_data->{'uri'};
$item['uid'] = hash('md5', $item['content']);
$this->items[] = $item;
}
// Get the info about the car offer
$image = $car->find('div[class=car-card__visual]', 0)->find('img', 0)->src;
$serie = $car->find('div[class=car-card__title]', 0)->plaintext;
$url = $car->find('a', 0)->href;
// Check if the car model is in stock or available only on order
if($car->find('span[class*=tag--dispo]', 0) != null) {
$availability = 'En Stock';
} else {
$availability = 'Sur commande';
}
$discount_html = $car->find('span[class=promo]', 0);
// Check if there is any discount dsiplayed
if ($discount_html != null) {
$discount = $discount_html->plaintext;
} else {
$discount = 'inconnue';
}
$price = $car->find('span[class=price]', 0)->plaintext;
// Construct the new item
$item = array();
$item['title'] = $finish_name . ' ' . $serie;
$item['content'] = '<p><img style="vertical-align:middle ; padding: 10px" src="' . $image . '" />'
. $finish_name . ' ' . $serie . '</p>';
$item['content'] .= '<ul><li>Disponibilité : ' . $availability . '</li>';
$item['content'] .= '<li>Série : ' . $serie . '</li>';
$item['content'] .= '<li>Remise : ' . $discount . '</li>';
$item['content'] .= '<li>Prix : ' . $price . '</li></ul>';
// Add a fictionnal anchor to the RSS element URL, based on the item content ;
// As the URL could be identical even if the price change, some RSS reader will not show those offers as new items
$item['uri'] = $url . '#' . md5($item['content']);
$this->items[] = $item;
}
}
private function getResults(int $page)
{
$user_input = $this->getInput('url');
$search_data = preg_replace('#(recherche|recherche/[0-9]{1,10})\?#', 'recherche/' . $page . '?', $user_input);
$search_url = self::URI . $search_data . '&open=energy&onlyFilters=false';
// Get the HTML content of the page
$html = getSimpleHTMLDOMCached($search_url);
return $html;
}
}

View File

@@ -18,8 +18,7 @@ class AwwwardsBridge extends BridgeAbstract {
private function fetchSites() {
Debug::log('Fetching all sites');
$sites = getSimpleHTMLDOM(self::SITESURI)
or returnServerError('Could not fetch JSON for sites.');
$sites = getSimpleHTMLDOM(self::SITESURI);
Debug::log('Parsing all JSON data');
foreach($sites->find('li[data-model]') as $site) {

View File

@@ -220,8 +220,7 @@ class BadDragonBridge extends BridgeAbstract {
public function collectData() {
switch($this->queriedContext) {
case 'Sales':
$sales = json_decode(getContents(self::URI . 'api/sales'))
or returnServerError('Failed to query BD API');
$sales = json_decode(getContents(self::URI . 'api/sales'));
foreach($sales as $sale) {
$item = array();
@@ -274,12 +273,10 @@ class BadDragonBridge extends BridgeAbstract {
}
break;
case 'Clearance':
$toyData = json_decode(getContents($this->inputToURL(true)))
or returnServerError('Failed to query BD API');
$toyData = json_decode(getContents($this->inputToURL(true)));
$productList = json_decode(getContents(self::URI
. 'api/inventory-toy/product-list'))
or returnServerError('Failed to query BD API');
. 'api/inventory-toy/product-list'));
foreach($toyData->toys as $toy) {
$item = array();

View File

@@ -3,23 +3,80 @@ class BakaUpdatesMangaReleasesBridge extends BridgeAbstract {
const NAME = 'Baka Updates Manga Releases';
const URI = 'https://www.mangaupdates.com/';
const DESCRIPTION = 'Get the latest series releases';
const MAINTAINER = 'fulmeek';
const PARAMETERS = array(array(
'series_id' => array(
'name' => 'Series ID',
'type' => 'number',
'required' => true,
'exampleValue' => '12345'
const MAINTAINER = 'fulmeek, KamaleiZestri';
const PARAMETERS = array(
'By series' => array(
'series_id' => array(
'name' => 'Series ID',
'type' => 'number',
'required' => true,
'exampleValue' => '188066'
)
),
'By list' => array(
'list_id' => array(
'name' => 'List ID and Type',
'type' => 'text',
'required' => true,
'exampleValue' => '4395&list=read'
)
)
));
);
const LIMIT_COLS = 5;
const LIMIT_ITEMS = 10;
const RELEASES_URL = 'https://www.mangaupdates.com/releases.html';
private $feedName = '';
public function collectData() {
$html = getSimpleHTMLDOM($this->getURI())
or returnServerError('Series not found');
if($this -> queriedContext == 'By series')
$this -> collectDataBySeries();
else //queriedContext == 'By list'
$this -> collectDataByList();
}
public function getURI(){
if($this -> queriedContext == 'By series') {
$series_id = $this->getInput('series_id');
if (!empty($series_id)) {
return self::URI . 'releases.html?search=' . $series_id . '&stype=series';
}
} else //queriedContext == 'By list'
return self::RELEASES_URL;
return self::URI;
}
public function getName(){
if(!empty($this->feedName)) {
return $this->feedName . ' - ' . self::NAME;
}
return parent::getName();
}
private function getSanitizedHash($string) {
return hash('sha1', preg_replace('/[^a-zA-Z0-9\-\.]/', '', ucwords(strtolower($string))));
}
private function filterText($text) {
return rtrim($text, '* ');
}
private function filterHTML($text) {
return $this->filterText(html_entity_decode($text));
}
private function findID($manga) {
// sometimes new series are on the release list that have no ID. just drop them.
if(@$this -> filterHTML($manga -> find('a', 0) -> href) != null) {
preg_match('/id=([0-9]*)/', $this -> filterHTML($manga -> find('a', 0) -> href), $match);
return $match[1];
} else
return 0;
}
private function collectDataBySeries() {
$html = getSimpleHTMLDOM($this->getURI());
// content is an unstructured pile of divs, ugly to parse
$cols = $html->find('div#main_content div.row > div.text');
@@ -68,36 +125,62 @@ class BakaUpdatesMangaReleasesBridge extends BridgeAbstract {
$item['title'] = implode(' ', $title);
$item['uri'] = $this->getURI();
$item['uid'] = $this->getSanitizedHash($item['title']);
$item['uid'] = $this->getSanitizedHash($item['title'] . $item['author']);
$this->items[] = $item;
}
}
public function getURI(){
$series_id = $this->getInput('series_id');
if (!empty($series_id)) {
return self::URI . 'releases.html?search=' . $series_id . '&stype=series';
private function collectDataByList() {
$this -> feedName = 'Releases';
$list = array();
$releasesHTML = getSimpleHTMLDOM(self::RELEASES_URL);
$list_id = $this -> getInput('list_id');
$listHTML = getSimpleHTMLDOM('https://www.mangaupdates.com/mylist.html?id=' . $list_id);
//get ids of the manga that the user follows,
$parts = $listHTML -> find('table#ptable tr > td.pl');
foreach($parts as $part) {
$list[] = $this -> findID($part);
}
return self::URI;
}
public function getName(){
if(!empty($this->feedName)) {
return $this->feedName . ' - ' . self::NAME;
//similar to above, but the divs are in groups of 3.
$cols = $releasesHTML -> find('div#main_content div.row > div.pbreak');
$rows = array_slice(array_chunk($cols, 3), 0);
foreach($rows as $cols) {
//check if current manga is in user's list.
$id = $this -> findId($cols[0]);
if(!array_search($id, $list)) continue;
$item = array();
$title = array();
$item['content'] = '';
$objTitle = $cols[0];
if ($objTitle) {
$title[] = $this->filterHTML($objTitle->plaintext);
$item['content'] .= '<p>Series: ' . $this->filterHTML($objTitle -> innertext) . '</p>';
}
$objVolChap = $cols[1];
if ($objVolChap && !empty($objVolChap->plaintext))
$title[] = $this -> filterHTML($objVolChap -> innertext);
$objAuthor = $cols[2];
if ($objAuthor && !empty($objAuthor->plaintext)) {
$item['author'] = $this->filterHTML($objAuthor -> plaintext);
$item['content'] .= '<p>Groups: ' . $this->filterHTML($objAuthor -> innertext) . '</p>';
}
$item['title'] = implode(' ', $title);
$item['uri'] = self::URI . 'releases.html?search=' . $id . '&stype=series';
$item['uid'] = $this->getSanitizedHash($item['title'] . $item['author']);
$this->items[] = $item;
}
return parent::getName();
}
private function getSanitizedHash($string) {
return hash('sha1', preg_replace('/[^a-zA-Z0-9\-\.]/', '', ucwords(strtolower($string))));
}
private function filterText($text) {
return rtrim($text, '* ');
}
private function filterHTML($text) {
return $this->filterText(html_entity_decode($text));
}
}

View File

@@ -11,7 +11,8 @@ class BandcampBridge extends BridgeAbstract {
'tag' => array(
'name' => 'tag',
'type' => 'text',
'required' => true
'required' => true,
'exampleValue' => 'hip-hop-rap'
)
),
'By band' => array(
@@ -19,6 +20,32 @@ class BandcampBridge extends BridgeAbstract {
'name' => 'band',
'type' => 'text',
'title' => 'Band name as seen in the band page URL',
'required' => true,
'exampleValue' => 'aesoprock'
),
'type' => array(
'name' => 'Articles are',
'type' => 'list',
'values' => array(
'Releases' => 'releases',
'Releases, new one when track list changes' => 'changes',
'Individual tracks' => 'tracks'
),
'defaultValue' => 'changes'
),
'limit' => array(
'name' => 'limit',
'type' => 'number',
'required' => true,
'title' => 'Number of releases to return',
'defaultValue' => 5
)
),
'By label' => array(
'label' => array(
'name' => 'label',
'type' => 'text',
'title' => 'label name as seen in the label page URL',
'required' => true
),
'type' => array(
@@ -43,13 +70,15 @@ class BandcampBridge extends BridgeAbstract {
'name' => 'band',
'type' => 'text',
'title' => 'Band name as seen in the album page URL',
'required' => true
'required' => true,
'exampleValue' => 'aesoprock'
),
'album' => array(
'name' => 'album',
'type' => 'text',
'title' => 'Album name as seen in the album page URL',
'required' => true
'required' => true,
'exampleValue' => 'appleseed'
),
'type' => array(
'name' => 'Articles are',
@@ -86,8 +115,7 @@ class BandcampBridge extends BridgeAbstract {
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => $data
);
$content = getContents($url, $header, $opts)
or returnServerError('Could not complete request to: ' . $url);
$content = getContents($url, $header, $opts);
$json = json_decode($content);
@@ -122,12 +150,15 @@ class BandcampBridge extends BridgeAbstract {
}
break;
case 'By band':
case 'By label':
case 'By album':
$html = getSimpleHTMLDOMCached($this->getURI(), 86400);
$titleElement = $html->find('head meta[name=title]', 0)
or returnServerError('Unable to find title on: ' . $this->getURI());
$this->feedName = $titleElement->content;
if ($html->find('meta[name=title]', 0)) {
$this->feedName = $html->find('meta[name=title]', 0)->content;
} else {
$this->feedName = str_replace('Music | ', '', $html->find('title', 0)->plaintext);
}
$regex = '/band_id=(\d+)/';
if(preg_match($regex, $html, $matches) == false)
@@ -137,6 +168,7 @@ class BandcampBridge extends BridgeAbstract {
$tralbums = array();
switch($this->queriedContext) {
case 'By band':
case 'By label':
$query_data = array(
'band_id' => $band_id
);
@@ -272,8 +304,7 @@ class BandcampBridge extends BridgeAbstract {
private function apiGet($endpoint, $query_data) {
$url = self::URI . 'api/' . $endpoint . '?' . http_build_query($query_data);
$data = json_decode(getContents($url))
or returnServerError('API request to "' . $url . '" failed.');
$data = json_decode(getContents($url));
return $data;
}
@@ -287,6 +318,13 @@ class BandcampBridge extends BridgeAbstract {
. '?sort_field=date';
}
break;
case 'By label':
if(!is_null($this->getInput('label'))) {
return 'https://'
. $this->getInput('label')
. '.bandcamp.com/music';
}
break;
case 'By band':
if(!is_null($this->getInput('band'))) {
return 'https://'
@@ -321,6 +359,13 @@ class BandcampBridge extends BridgeAbstract {
return $this->getInput('band') . ' - Bandcamp Band';
}
break;
case 'By label':
if(isset($this->feedName)) {
return $this->feedName . ' - Bandcamp Label';
} elseif(!is_null($this->getInput('label'))) {
return $this->getInput('label') . ' - Bandcamp Label';
}
break;
case 'By album':
if(isset($this->feedName)) {
return $this->feedName . ' - Bandcamp Album';

View File

@@ -0,0 +1,155 @@
<?php
class BandcampDailyBridge extends BridgeAbstract {
const NAME = 'Bandcamp Daily Bridge';
const URI = 'https://daily.bandcamp.com';
const DESCRIPTION = 'Returns newest articles';
const MAINTAINER = 'VerifiedJoseph';
const PARAMETERS = array(
'Latest articles' => array(),
'Best of' => array(
'content' => array(
'name' => 'content',
'type' => 'list',
'values' => array(
'Best Ambient' => 'best-ambient',
'Best Beat Tapes' => 'best-beat-tapes',
'Best Dance 12\'s' => 'best-dance-12s',
'Best Contemporary Classical' => 'best-contemporary-classical',
'Best Electronic' => 'best-electronic',
'Best Experimental' => 'best-experimental',
'Best Hip-Hop' => 'best-hip-hop',
'Best Jazz' => 'best-jazz',
'Best Metal' => 'best-metal',
'Best Punk' => 'best-punk',
'Best Reissues' => 'best-reissues',
'Best Soul' => 'best-soul',
),
'defaultValue' => 'best-ambient',
),
),
'Genres' => array(
'content' => array(
'name' => 'content',
'type' => 'list',
'values' => array(
'Acoustic' => 'genres/acoustic',
'Alternative' => 'genres/alternative',
'Ambient' => 'genres/ambient',
'Blues' => 'genres/blues',
'Classical' => 'genres/classical',
'Comedy' => 'genres/comedy',
'Country' => 'genres/country',
'Devotional' => 'genres/devotional',
'Electronic' => 'genres/electronic',
'Experimental' => 'genres/experimental',
'Folk' => 'genres/folk',
'Funk' => 'genres/funk',
'Hip-Hop/Rap' => 'genres/hip-hop-rap',
'Jazz' => 'genres/jazz',
'Kids' => 'genres/kids',
'Latin' => 'genres/latin',
'Metal' => 'genres/metal',
'Pop' => 'genres/pop',
'Punk' => 'genres/punk',
'R&B/Soul' => 'genres/r-b-soul',
'Reggae' => 'genres/reggae',
'Rock' => 'genres/rock',
'Soundtrack' => 'genres/soundtrack',
'Spoken Word' => 'genres/spoken-word',
'World' => 'genres/world',
),
'defaultValue' => 'genres/acoustic',
),
),
'Franchises' => array(
'content' => array(
'name' => 'content',
'type' => 'list',
'values' => array(
'Lists' => 'lists',
'Features' => 'features',
'Album of the Day' => 'album-of-the-day',
'Acid Test' => 'acid-test',
'Bandcamp Navigator' => 'bandcamp-navigator',
'Big Ups' => 'big-ups',
'Certified' => 'certified',
'Gallery' => 'gallery',
'Hidden Gems' => 'hidden-gems',
'High Scores' => 'high-scores',
'Label Profile' => 'label-profile',
'Lifetime Achievement' => 'lifetime-achievement',
'Scene Report' => 'scene-report',
'Seven Essential Releases' => 'seven-essential-releases',
'The Merch Table' => 'the-merch-table',
),
'defaultValue' => 'lists',
),
)
);
const CACHE_TIMEOUT = 3600; // 1 hour
public function collectData() {
$html = getSimpleHTMLDOM($this->getURI())
or returnServerError('Could not request: ' . $this->getURI());
$html = defaultLinkTo($html, self::URI);
$articles = $html->find('articles-list', 0);
foreach($articles->find('div.list-article') as $index => $article) {
$item = array();
$articlePath = $article->find('a.title', 0)->href;
$articlePageHtml = getSimpleHTMLDOMCached($articlePath, 3600)
or returnServerError('Could not request: ' . $articlePath);
$item['uri'] = $articlePath;
$item['title'] = $articlePageHtml->find('article-title', 0)->innertext;
$item['author'] = $articlePageHtml->find('article-credits > a', 0)->innertext;
$item['content'] = html_entity_decode($articlePageHtml->find('meta[name="description"]', 0)->content, ENT_QUOTES);
$item['timestamp'] = $articlePageHtml->find('meta[property="article:published_time"]', 0)->content;
$item['categories'][] = $articlePageHtml->find('meta[property="article:section"]', 0)->content;
if ($articlePageHtml->find('meta[property="article:tag"]', 0)) {
$item['categories'][] = $articlePageHtml->find('meta[property="article:tag"]', 0)->content;
}
$item['enclosures'][] = $articlePageHtml->find('meta[name="twitter:image"]', 0)->content;
$this->items[] = $item;
if (count($this->items) >= 10) {
break;
}
}
}
public function getURI() {
switch($this->queriedContext) {
case 'Latest articles':
return self::URI . '/latest';
case 'Best of':
case 'Genres':
case 'Franchises':
return self::URI . '/' . $this->getInput('content');
default:
return parent::getURI();
}
}
public function getName() {
if ($this->queriedContext === 'Latest articles') {
return $this->queriedContext . ' - Bandcamp Daily';
}
if (!is_null($this->getInput('content'))) {
$contentValues = array_flip(self::PARAMETERS[$this->queriedContext]['content']['values']);
return $contentValues[$this->getInput('content')] . ' - Bandcamp Daily';
}
return parent::getName();
}
}

View File

@@ -8,8 +8,7 @@ class BastaBridge extends BridgeAbstract {
const DESCRIPTION = 'Returns the newest articles.';
public function collectData(){
$html = getSimpleHTMLDOM(self::URI . 'spip.php?page=backend')
or returnServerError('Could not request Bastamag.');
$html = getSimpleHTMLDOM(self::URI . 'spip.php?page=backend');
$limit = 0;
@@ -19,13 +18,11 @@ class BastaBridge extends BridgeAbstract {
$item['title'] = $element->find('title', 0)->innertext;
$item['uri'] = $element->find('guid', 0)->plaintext;
$item['timestamp'] = strtotime($element->find('dc:date', 0)->plaintext);
// Replaces all relative image URLs by absolute URLs.
// Relative URLs always start with 'local/'!
$item['content'] = preg_replace(
'/src=["\']{1}([^"\']+)/ims',
'src=\'' . self::URI . '$1\'',
getSimpleHTMLDOM($item['uri'])->find('div.texte', 0)->innertext
);
$html = getSimpleHTMLDOM($item['uri']);
$html = defaultLinkTo($html, self::URI);
$item['content'] = $html->find('div.texte', 0)->innertext;
$this->items[] = $item;
$limit++;
}

View File

@@ -35,28 +35,23 @@ class BinanceBridge extends BridgeAbstract {
}
protected function collectBlogData() {
$html = getSimpleHTMLDOM($this->getURI())
or returnServerError('Could not fetch Binance blog data.');
$html = getSimpleHTMLDOM($this->getURI());
foreach($html->find('div[direction="row"]') as $element) {
$appData = $html->find('script[id="__APP_DATA"]');
$appDataJson = json_decode($appData[0]->innertext);
$date = $element->find('div[direction="column"]', 0);
$day = $date->find('div', 0)->innertext;
$month = $date->find('div', 1)->innertext;
$extractedDate = $day . ' ' . $month;
foreach($appDataJson->pageData->redux->blogList->blogList as $element) {
$abstract = $element->find('div[direction="column"]', 1);
$a = $abstract->find('a', 0);
$uri = self::URI . $a->href;
$title = $a->innertext;
$full = getSimpleHTMLDOMCached($uri);
$content = $full->find('div.desc', 1);
$date = $element->postTime;
$abstract = $element->brief;
$uri = self::URI . '/' . $element->lang . '/blog/' . $element->idStr;
$title = $element->title;
$content = $element->content;
$item = array();
$item['title'] = $title;
$item['uri'] = $uri;
$item['timestamp'] = strtotime($extractedDate);
$item['timestamp'] = substr($date, 0, -3);
$item['author'] = 'Binance';
$item['content'] = $content;
@@ -68,8 +63,7 @@ class BinanceBridge extends BridgeAbstract {
}
protected function collectAnnouncementData() {
$html = getSimpleHTMLDOM($this->getURI())
or returnServerError('Could not fetch Zendesk announcement data.');
$html = getSimpleHTMLDOM($this->getURI());
foreach($html->find('a.article-list-link') as $a) {
$title = $a->innertext;

View File

@@ -1,119 +0,0 @@
<?php
class BingSearchBridge extends BridgeAbstract
{
const NAME = 'Bing search';
const URI = 'https://www.bing.com/';
const DESCRIPTION = 'Return images from bing search discover';
const MAINTAINER = 'DnAp';
const PARAMETERS = array(
'Image Discover' => array(
'category' => array(
'name' => 'Categories',
'type' => 'list',
'values' => self::IMAGE_DISCOVER_CATEGORIES
),
'image_size' => array(
'name' => 'Image size',
'type' => 'list',
'values' => array(
'Small' => 'turl',
'Full size' => 'imgurl'
)
)
)
);
const IMAGE_DISCOVER_CATEGORIES = array(
'Abstract' => 'abstract',
'Animals' => 'animals',
'Anime' => 'anime',
'Architecture' => 'architecture',
'Arts and Crafts' => 'arts-and-crafts',
'Beauty' => 'beauty',
'Cars and Motorcycles' => 'cars-and-motorcycles',
'Cats' => 'cats',
'Celebrities' => 'celebrities',
'Comics' => 'comics',
'DIY' => 'diy',
'Dogs' => 'dogs',
'Fitness' => 'fitness',
'Food and Drink' => 'food-and-drink',
'Funny' => 'funny',
'Gadgets' => 'gadgets',
'Gardening' => 'gardening',
'Geeky' => 'geeky',
'Hairstyles' => 'hairstyles',
'Home Decor' => 'home-decor',
'Marine Life' => 'marine-life',
'Men\'s Fashion' => 'men%27s-fashion',
'Nature' => 'nature',
'Outdoors' => 'outdoors',
'Parenting' => 'parenting',
'Phone Wallpapers' => 'phone-wallpapers',
'Photography' => 'photography',
'Quotes' => 'quotes',
'Recipes' => 'recipes',
'Snow' => 'snow',
'Tattoos' => 'tattoos',
'Travel' => 'travel',
'Video Games' => 'video-games',
'Weddings' => 'weddings',
'Women\'s Fashion' => 'women%27s-fashion',
);
public function getIcon()
{
return 'https://www.bing.com/sa/simg/bing_p_rr_teal_min.ico';
}
public function collectData()
{
$this->items = $this->imageDiscover($this->getInput('category'));
}
public function getName()
{
if ($this->getInput('category')) {
if (self::IMAGE_DISCOVER_CATEGORIES[$this->getInput('categories')] !== null) {
$category = self::IMAGE_DISCOVER_CATEGORIES[$this->getInput('categories')];
} else {
$category = 'Unknown';
}
return 'Best ' . $category . ' - Bing Image Discover';
}
return parent::getName();
}
private function imageDiscover($category)
{
$html = getSimpleHTMLDOM(self::URI . '/discover/' . $category)
or returnServerError('Could not request ' . self::NAME);
$sizeKey = $this->getInput('image_size');
$items = array();
foreach ($html->find('a.iusc') as $element) {
$data = json_decode(htmlspecialchars_decode($element->getAttribute('m')), true);
$item = array();
$item['title'] = basename(rtrim($data['imgurl'], '/'));
$item['uri'] = $data['imgurl'];
$item['content'] = '<a href="' . $data['imgurl'] . '">
<img src="' . $data[$sizeKey] . '" alt="' . $item['title'] . '"></a>
<p>Source: <a href="' . $this->curUrl($data['surl']) . '"> </a></p>';
$item['enclosures'] = $data['imgurl'];
$items[] = $item;
}
return $items;
}
private function curUrl($url)
{
if (strlen($url) <= 80) {
return $url;
}
return substr($url, 0, 80) . '...';
}
}

View File

@@ -13,8 +13,7 @@ class BlaguesDeMerdeBridge extends BridgeAbstract {
public function collectData(){
$html = getSimpleHTMLDOM(self::URI)
or returnServerError('Could not request BDM.');
$html = getSimpleHTMLDOM(self::URI);
foreach($html->find('div.blague') as $element) {

View File

@@ -0,0 +1,29 @@
<?php
class BleepingComputerBridge extends FeedExpander {
const MAINTAINER = 'csisoap';
const NAME = 'Bleeping Computer';
const URI = 'https://www.bleepingcomputer.com/';
const DESCRIPTION = 'Returns the newest articles.';
protected function parseItem($item){
$item = parent::parseItem($item);
$article_html = getSimpleHTMLDOMCached($item['uri']);
if(!$article_html) {
$item['content'] .= '<p><em>Could not request ' . $this->getName() . ': ' . $item['uri'] . '</em></p>';
return $item;
}
$article_content = $article_html->find('div.articleBody', 0)->innertext;
$article_content = stripRecursiveHTMLSection($article_content, 'div', '<div class="cz-related-article-wrapp');
$item['content'] = trim($article_content);
return $item;
}
public function collectData(){
$feed = static::URI . 'feed/';
$this->collectExpandableDatas($feed);
}
}

View File

@@ -0,0 +1,60 @@
<?php
class BlizzardNewsBridge extends XPathAbstract {
const NAME = 'Blizzard News';
const URI = 'https://news.blizzard.com';
const DESCRIPTION = 'Blizzard (game company) newsfeed';
const MAINTAINER = 'Niehztog';
const PARAMETERS = array(
'' => array(
'locale' => array(
'name' => 'Language',
'type' => 'list',
'values' => array(
'Deutsch' => 'de-de',
'English (EU)' => 'en-gb',
'English (US)' => 'en-us',
'Español (EU)' => 'es-es',
'Español (AL)' => 'es-mx',
'Français' => 'fr-fr',
'Italiano' => 'it-it',
'日本語' => 'ja-jp',
'한국어' => 'ko-kr',
'Polski' => 'pl-pl',
'Português (AL)' => 'pt-br',
'Русский' => 'ru-ru',
'ภาษาไทย' => 'th-th',
'简体中文' => 'zh-cn',
'繁體中文' => 'zh-tw'
),
'defaultValue' => 'en-us',
'title' => 'Select your language'
)
)
);
const CACHE_TIMEOUT = 3600;
const XPATH_EXPRESSION_ITEM = '/html/body/div/div[4]/div[2]/div[2]/div/div/section/ol/li/article';
const XPATH_EXPRESSION_ITEM_TITLE = './/div/div[2]/h2';
const XPATH_EXPRESSION_ITEM_CONTENT = './/div[@class="ArticleListItem-description"]/div[@class="h6"]';
const XPATH_EXPRESSION_ITEM_URI = './/a[@class="ArticleLink ArticleLink"]/@href';
const XPATH_EXPRESSION_ITEM_AUTHOR = '';
const XPATH_EXPRESSION_ITEM_TIMESTAMP = './/time[@class="ArticleListItem-footerTimestamp"]/@timestamp';
const XPATH_EXPRESSION_ITEM_ENCLOSURES = './/div[@class="ArticleListItem-image"]/@style';
const XPATH_EXPRESSION_ITEM_CATEGORIES = './/div[@class="ArticleListItem-label"]';
const SETTING_FIX_ENCODING = true;
/**
* Source Web page URL (should provide either HTML or XML content)
* @return string
*/
protected function getSourceUrl(){
$locale = $this->getInput('locale');
if('zh-cn' === $locale) {
return 'https://cn.news.blizzard.com';
}
return 'https://news.blizzard.com/' . $locale;
}
}

View File

@@ -5,7 +5,7 @@ class BooruprojectBridge extends GelbooruBridge {
const MAINTAINER = 'mitsukarenai';
const NAME = 'Booruproject';
const URI = 'http://booru.org/';
const URI = 'https://booru.org/';
const DESCRIPTION = 'Returns images from given page of booruproject';
const PARAMETERS = array(
'global' => array(
@@ -14,13 +14,17 @@ class BooruprojectBridge extends GelbooruBridge {
'type' => 'number'
),
't' => array(
'name' => 'tags'
'name' => 'tags',
'required' => true,
'exampleValue' => 'tagme',
'title' => 'Use "all" to get all posts'
)
),
'Booru subdomain (subdomain.booru.org)' => array(
'i' => array(
'name' => 'Subdomain',
'required' => true
'required' => true,
'exampleValue' => 'rm'
)
)
);
@@ -29,7 +33,7 @@ class BooruprojectBridge extends GelbooruBridge {
public function getURI(){
if(!is_null($this->getInput('i'))) {
return 'http://' . $this->getInput('i') . '.booru.org/';
return 'https://' . $this->getInput('i') . '.booru.org/';
}
return parent::getURI();

View File

@@ -16,6 +16,7 @@ class BrutBridge extends BridgeAbstract {
'Entertainment' => 'entertainment',
'Sports' => 'sport',
'Nature' => 'nature',
'Health' => 'health',
),
'defaultValue' => 'news',
),
@@ -26,6 +27,7 @@ class BrutBridge extends BridgeAbstract {
'United States' => 'us',
'United Kingdom' => 'uk',
'France' => 'fr',
'Spain' => 'es',
'India' => 'in',
'Mexico' => 'mx',
),
@@ -42,8 +44,7 @@ class BrutBridge extends BridgeAbstract {
public function collectData() {
$html = getSimpleHTMLDOM($this->getURI())
or returnServerError('Could not request: ' . $this->getURI());
$html = getSimpleHTMLDOM($this->getURI());
$results = $html->find('div.results', 0);
@@ -52,8 +53,7 @@ class BrutBridge extends BridgeAbstract {
$videoPath = self::URI . $li->children(0)->href;
$videoPageHtml = getSimpleHTMLDOMCached($videoPath, 3600)
or returnServerError('Could not request: ' . $videoPath);
$videoPageHtml = getSimpleHTMLDOMCached($videoPath, 3600);
$this->videoImage = $videoPageHtml->find('meta[name="twitter:image"]', 0)->content;

218
bridges/BukowskisBridge.php Normal file
View File

@@ -0,0 +1,218 @@
<?php
class BukowskisBridge extends BridgeAbstract
{
const NAME = 'Bukowskis';
const URI = 'https://www.bukowskis.com';
const DESCRIPTION = 'Fetches info about auction objects from Bukowskis auction house';
const MAINTAINER = 'Qluxzz';
const PARAMETERS = array(array(
'category' => array(
'name' => 'Category',
'type' => 'list',
'values' => array(
'All categories' => '',
'Art' => array(
'All' => 'art',
'Classic Art' => 'art.classic-art',
'Classic Finnish Art' => 'art.classic-finnish-art',
'Classic Swedish Art' => 'art.classic-swedish-art',
'Contemporary' => 'art.contemporary',
'Modern Finnish Art' => 'art.modern-finnish-art',
'Modern International Art' => 'art.modern-international-art',
'Modern Swedish Art' => 'art.modern-swedish-art',
'Old Masters' => 'art.old-masters',
'Other' => 'art.other',
'Photographs' => 'art.photographs',
'Prints' => 'art.prints',
'Sculpture' => 'art.sculpture',
'Swedish Old Masters' => 'art.swedish-old-masters',
),
'Asian Ceramics & Works of Art' => array(
'All' => 'asian-ceramics-works-of-art',
'Other' => 'asian-ceramics-works-of-art.other',
'Porcelain' => 'asian-ceramics-works-of-art.porcelain',
),
'Books & Manuscripts' => array(
'All' => 'books-manuscripts',
'Books' => 'books-manuscripts.books',
),
'Carpets, rugs & textiles' => array(
'All' => 'carpets-rugs-textiles',
'European' => 'carpets-rugs-textiles.european',
'Oriental' => 'carpets-rugs-textiles.oriental',
'Rest of the world' => 'carpets-rugs-textiles.rest-of-the-world',
'Scandinavian' => 'carpets-rugs-textiles.scandinavian',
),
'Ceramics & porcelain' => array(
'All' => 'ceramics-porcelain',
'Ceramic ware' => 'ceramics-porcelain.ceramic-ware',
'European' => 'ceramics-porcelain.european',
'Rest of the world' => 'ceramics-porcelain.rest-of-the-world',
'Scandinavian' => 'ceramics-porcelain.scandinavian',
),
'Collectibles' => array(
'All' => 'collectibles',
'Advertising & Retail' => 'collectibles.advertising-retail',
'Memorabilia' => 'collectibles.memorabilia',
'Movies & music' => 'collectibles.movies-music',
'Other' => 'collectibles.other',
'Retro & Popular Culture' => 'collectibles.retro-popular-culture',
'Technica & Nautica' => 'collectibles.technica-nautica',
'Toys' => 'collectibles.toys',
),
'Design' => array(
'All' => 'design',
'Art glass' => 'design.art-glass',
'Furniture' => 'design.furniture',
'Other' => 'design.other',
),
'Folk art' => array(
'All' => 'folk-art',
'All categories' => 'lots',
),
'Furniture' => array(
'All' => 'furniture',
'Armchairs & Sofas' => 'furniture.armchairs-sofas',
'Cabinets & Bureaus' => 'furniture.cabinets-bureaus',
'Chairs' => 'furniture.chairs',
'Garden furniture' => 'furniture.garden-furniture',
'Mirrors' => 'furniture.mirrors',
'Other' => 'furniture.other',
'Shelves & Book cases' => 'furniture.shelves-book-cases',
'Tables' => 'furniture.tables',
),
'Glassware' => array(
'All' => 'glassware',
'Glassware' => 'glassware.glassware',
'Other' => 'glassware.other',
),
'Jewellery' => array(
'All' => 'jewellery',
'Bracelets' => 'jewellery.bracelets',
'Brooches' => 'jewellery.brooches',
'Earrings' => 'jewellery.earrings',
'Necklaces & Pendants' => 'jewellery.necklaces-pendants',
'Other' => 'jewellery.other',
'Rings' => 'jewellery.rings',
),
'Lighting' => array(
'All' => 'lighting',
'Candle sticks & Candelabras' => 'lighting.candle-sticks-candelabras',
'Ceiling lights' => 'lighting.ceiling-lights',
'Chandeliers' => 'lighting.chandeliers',
'Floor lights' => 'lighting.floor-lights',
'Other' => 'lighting.other',
'Table lights' => 'lighting.table-lights',
'Wall lights' => 'lighting.wall-lights',
),
'Militaria' => array(
'All' => 'militaria',
'Honors & Medals' => 'militaria.honors-medals',
'Other militaria' => 'militaria.other-militaria',
'Weaponry' => 'militaria.weaponry',
),
'Miscellaneous' => array(
'All' => 'miscellaneous',
'Brass, Copper & Pewter' => 'miscellaneous.brass-copper-pewter',
'Nickel silver' => 'miscellaneous.nickel-silver',
'Oriental' => 'miscellaneous.oriental',
'Other' => 'miscellaneous.other',
),
'Silver' => array(
'All' => 'silver',
'Candle sticks' => 'silver.candle-sticks',
'Cups & Bowls' => 'silver.cups-bowls',
'Cutlery' => 'silver.cutlery',
'Other' => 'silver.other',
),
'Timepieces' => array(
'All' => 'timepieces',
'Other' => 'timepieces.other',
'Pocket watches' => 'timepieces.pocket-watches',
'Table clocks' => 'timepieces.table-clocks',
'Wrist watches' => 'timepieces.wrist-watches',
),
'Vintage & Fashion' => array(
'All' => 'vintage-fashion',
'Accessories' => 'vintage-fashion.accessories',
'Bags & Trunks' => 'vintage-fashion.bags-trunks',
'Clothes' => 'vintage-fashion.clothes',
),
)
),
'sort_order' => array(
'name' => 'Sort order',
'type' => 'list',
'values' => array(
'Ending soon' => 'ending',
'Most recent' => 'recent',
'Most bids' => 'most',
'Fewest bids' => 'fewest',
'Lowest price' => 'lowest',
'Highest price' => 'highest',
'Lowest estimate' => 'low',
'Highest estimate' => 'high',
'Alphabetical' => 'alphabetical',
),
),
'language' => array(
'name' => 'Language',
'type' => 'list',
'values' => array(
'English' => 'en',
'Swedish' => 'sv',
'Finnish' => 'fi'
),
),
));
const CACHE_TIMEOUT = 3600; // 1 hour
private $title;
public function collectData()
{
$baseUrl = 'https://www.bukowskis.com';
$category = $this->getInput('category');
$language = $this->getInput('language');
$sort_order = $this->getInput('sort_order');
$url = $baseUrl . '/' . $language . '/lots';
if ($category)
$url = $url . '/category/' . $category;
if ($sort_order)
$url = $url . '/sort/' . $sort_order;
$html = getSimpleHTMLDOM($url);
$this->title = htmlspecialchars_decode($html->find('title', 0)->innertext);
foreach ($html->find('div.c-lot-index-lot') as $lot) {
$title = $lot->find('a.c-lot-index-lot__title', 0)->plaintext;
$relative_url = $lot->find('a.c-lot-index-lot__link', 0)->href;
$images = json_decode(
htmlspecialchars_decode(
$lot
->find('img.o-aspect-ratio__image', 0)
->getAttribute('data-thumbnails')
)
);
$this->items[] = array(
'title' => $title,
'uri' => $baseUrl . $relative_url,
'uid' => $lot->getAttribute('data-lot-id'),
'content' => count($images) > 0 ? "<img src='$images[0]'/><br/>$title" : $title,
'enclosures' => array_slice($images, 1),
);
}
}
public function getName()
{
return $this->title ?: parent::getName();
}
}

View File

@@ -41,8 +41,7 @@ class BundesbankBridge extends BridgeAbstract {
public function collectData() {
$html = getSimpleHTMLDOM($this->getURI())
or returnServerError('No response for ' . $this->getURI());
$html = getSimpleHTMLDOM($this->getURI());
$html = defaultLinkTo($html, $this->getURI());

View File

@@ -0,0 +1,89 @@
<?php
class BundestagParteispendenBridge extends BridgeAbstract {
const MAINTAINER = 'mibe';
const NAME = 'Deutscher Bundestag - Parteispenden';
const URI = 'https://www.bundestag.de/parlament/praesidium/parteienfinanzierung/fundstellen50000';
const CACHE_TIMEOUT = 86400; // 24h
const DESCRIPTION = 'Returns the latest "soft money" donations to parties represented in the German Bundestag.';
const CONTENT_TEMPLATE = <<<TMPL
<p><b>Partei:</b><br>%s</p>
<p><b>Spendenbetrag:</b><br>%s</p>
<p><b>Spender:</b><br>%s</p>
<p><b>Eingang der Spende:</b><br>%s</p>
TMPL;
public function getIcon()
{
return 'https://www.bundestag.de/static/appdata/includes/images/layout/favicon.ico';
}
public function collectData()
{
$ajaxUri = <<<URI
https://www.bundestag.de/ajax/filterlist/de/parlament/praesidium/parteienfinanzierung/fundstellen50000/462002-462002
URI;
// Get the main page
$html = getSimpleHTMLDOMCached($ajaxUri, self::CACHE_TIMEOUT)
or returnServerError('Could not request AJAX list.');
// Build the URL from the first anchor element. The list is sorted by year, descending, so the first element is the current year.
$firstAnchor = $html->find('a', 0)
or returnServerError('Could not find the proper HTML element.');
$url = 'https://www.bundestag.de' . $firstAnchor->href;
// Get the actual page with the soft money donations
$html = getSimpleHTMLDOMCached($url, self::CACHE_TIMEOUT)
or returnServerError('Could not request ' . $url);
$rows = $html->find('table.table > tbody > tr')
or returnServerError('Could not find the proper HTML elements.');
foreach($rows as $row) {
$item = $this->generateItemFromRow($row);
if (is_array($item)) {
$item['uri'] = $url;
$this->items[] = $item;
}
}
}
private function generateItemFromRow(simple_html_dom_node $row)
{
// The row must have 5 columns. There are monthly header rows, which are ignored here.
if(count($row->children) != 5)
return null;
$item = array();
// | column | paragraph inside column
$party = $row->children[0]->children[0]->innertext;
$amount = $row->children[1]->children[0]->innertext . ' €';
$donor = $row->children[2]->children[0]->innertext;
$date = $row->children[3]->children[0]->innertext;
$dip = $row->children[4]->children[0]->find('a.dipLink', 0);
// Strip whitespace from date string.
$date = str_replace(' ', '', $date);
$content = sprintf(self::CONTENT_TEMPLATE, $party, $amount, $donor, $date);
$item = array(
'title' => $party . ': ' . $amount,
'content' => $content,
'uid' => sha1($content),
);
// Try to get the link to the official document
if ($dip != null)
$item['enclosures'] = array($dip->href);
// Try to parse the date
$dateTime = DateTime::createFromFormat('d.m.Y', $date);
if ($dateTime !== false)
$item['timestamp'] = $dateTime->getTimestamp();
return $item;
}
}

View File

@@ -53,8 +53,7 @@ class CNETBridge extends BridgeAbstract {
// Retrieve webpage
$pageUrl = self::URI . (empty($topic) ? 'news/' : $topic . '/');
$html = getSimpleHTMLDOM($pageUrl)
or returnServerError('Could not request CNET: ' . $pageUrl);
$html = getSimpleHTMLDOM($pageUrl);
// Process articles
foreach($html->find('div.assetBody, div.riverPost') as $element) {

View File

@@ -12,13 +12,13 @@ class CNETFranceBridge extends FeedExpander
'name' => 'Exclude by title',
'required' => false,
'title' => 'Title term, separated by semicolon (;)',
'defaultValue' => 'bon plan;bons plans;au meilleur prix;des meilleures offres;Amazon Prime Day;RED by SFR ou B&You'
'exampleValue' => 'bon plan;bons plans;au meilleur prix;des meilleures offres;Amazon Prime Day;RED by SFR ou B&You'
),
'url' => array(
'name' => 'Exclude by url',
'required' => false,
'title' => 'URL term, separated by semicolon (;)',
'defaultValue' => 'bon-plan;bons-plans'
'exampleValue' => 'bon-plan;bons-plans'
)
)
);

View File

@@ -0,0 +1,140 @@
<?php
// CVE Details is a collection of CVEs, taken from the National Vulnerability
// Database (NVD) and other sources like the Exploit DB and Metasploit. The
// website categorizes it by vendor and product and attach the CWE category.
// There is a Atom feed available, but only logged in users can use it,
// it is not reliable and contain no useful information. This bridge create a
// sane feed with additional information like tags and a link to the CWE
// a description of the vulnerability.
class CVEDetailsBridge extends BridgeAbstract {
const MAINTAINER = 'Aaron Fischer';
const NAME = 'CVE Details';
const CACHE_TIMEOUT = 60 * 60 * 6; // 6 hours
const DESCRIPTION = 'Report new CVE vulnerabilities for a given vendor (and product)';
const URI = 'https://www.cvedetails.com';
const PARAMETERS = array(array(
// The Vendor ID can be taken from the URL
'vendor_id' => array(
'name' => 'Vendor ID',
'type' => 'number',
'required' => true,
'exampleValue' => 74, // PHP
),
// The optional Product ID can be taken from the URL as well
'product_id' => array(
'name' => 'Product ID',
'type' => 'number',
'required' => false,
'exampleValue' => 128, // PHP
),
));
private $html = null;
private $vendor = '';
private $product = '';
// Return the URL to query.
// Because of the optional product ID, we need to attach it if it is
// set. The search result page has the exact same structure (with and
// without the product ID).
private function _buildURL() {
$url = self::URI . '/vulnerability-list/vendor_id-' . $this->getInput('vendor_id');
if ($this->getInput('product_id') !== '') {
$url .= '/product_id-' . $this->getInput('product_id');
}
// Sadly, there is no way (prove me wrong please) to sort the search
// result by publish date. So the nearest alternative is the CVE
// number, which should be mostly accurate.
$url .= '?order=1'; // Order by CVE number DESC
return $url;
}
// Make the actual request to cvedetails.com and stores the response
// (HTML) for later use and extract vendor and product from it.
private function _fetchContent() {
$html = getSimpleHTMLDOM($this->_buildURL());
$this->html = defaultLinkTo($html, self::URI);
$vendor = $html->find('#contentdiv > h1 > a', 0);
if ($vendor == null) {
returnServerError('Invalid Vendor ID ' .
$this->getInput('vendor_id') .
' or Product ID ' .
$this->getInput('product_id'));
}
$this->vendor = $vendor->innertext;
$product = $html->find('#contentdiv > h1 > a', 1);
if ($product != null) {
$this->product = $product->innertext;
}
}
// Build the name of the feed.
public function getName() {
if ($this->getInput('vendor_id') == '') {
return self::NAME;
}
if ($this->html == null) {
$this->_fetchContent();
}
$name = 'CVE Vulnerabilities for ' . $this->vendor;
if ($this->product != '') {
$name .= '/' . $this->product;
}
return $name;
}
// Pull the data from the HTML response and fill the items..
public function collectData() {
if ($this->html == null) {
$this->_fetchContent();
}
foreach ($this->html->find('#vulnslisttable .srrowns') as $i => $tr) {
// There are some optional vulnerability types, which will be
// added to the categories as well as the CWE number -- which is
// always given.
$categories = array($this->vendor);
$enclosures = array();
$cwe = $tr->find('td', 2)->find('a', 0);
if ($cwe != null) {
$cwe = $cwe->innertext;
$categories[] = 'CWE-' . $cwe;
$enclosures[] = 'https://cwe.mitre.org/data/definitions/' . $cwe . '.html';
}
$c = $tr->find('td', 4)->innertext;
if (trim($c) != '') {
$categories[] = $c;
}
if ($this->product != '') {
$categories[] = $this->product;
}
// The CVE number itself
$title = $tr->find('td', 1)->find('a', 0)->innertext;
$this->items[] = array(
'uri' => $tr->find('td', 1)->find('a', 0)->href,
'title' => $title,
'timestamp' => $tr->find('td', 5)->innertext,
'content' => $tr->next_sibling()->innertext,
'categories' => $categories,
'enclosures' => $enclosures,
'uid' => $tr->find('td', 1)->find('a', 0)->innertext,
);
// We only want to fetch the latest 10 CVEs
if (count($this->items) >= 10) {
break;
}
}
}
}

View File

@@ -0,0 +1,41 @@
<?php
class CarThrottleBridge extends FeedExpander {
const NAME = 'Car Throttle ';
const URI = 'https://www.carthrottle.com';
const DESCRIPTION = 'Get the latest car-related news from Car Throttle.';
const MAINTAINER = 't0stiman';
public function collectData() {
$this->collectExpandableDatas('https://www.carthrottle.com/rss', 10);
}
protected function parseItem($feedItem) {
$item = parent::parseItem($feedItem);
//fetch page
$articlePage = getSimpleHTMLDOMCached($feedItem->link)
or returnServerError('Could not retrieve ' . $feedItem->link);
$subtitle = $articlePage->find('p.standfirst', 0);
$article = $articlePage->find('div.content_field', 0);
$item['content'] = str_get_html($subtitle . $article);
//convert <iframe>s to <a>s. meant for embedded videos.
foreach($item['content']->find('iframe') as $found) {
$iframeUrl = $found->getAttribute('src');
if ($iframeUrl) {
$found->outertext = '<a href="' . $iframeUrl . '">' . $iframeUrl . '</a>';
}
}
//remove scripts from the text
foreach ($item['content']->find('script') as $remove) {
$remove->outertext = '';
}
return $item;
}
}

View File

@@ -13,8 +13,8 @@ class CastorusBridge extends BridgeAbstract {
'name' => 'ZIP code',
'type' => 'text',
'required' => true,
'exampleValue' => '74910, 74',
'title' => 'Insert ZIP code (complete or partial)'
'exampleValue' => '7',
'title' => 'Insert ZIP code (complete or partial). e.g: 78125 OR 781 OR 7'
)
),
'Get latest changes via city name' => array(
@@ -22,8 +22,8 @@ class CastorusBridge extends BridgeAbstract {
'name' => 'City name',
'type' => 'text',
'required' => true,
'exampleValue' => 'Seyssel, Seys',
'title' => 'Insert city name (complete or partial)'
'exampleValue' => 'Paris',
'title' => 'Insert city name (complete or partial). e.g: Paris OR Par OR P'
)
)
);

View File

@@ -0,0 +1,60 @@
<?php
class CdactionBridge extends BridgeAbstract {
const NAME = 'CD-ACTION bridge';
const URI = 'https://cdaction.pl';
const DESCRIPTION = 'Fetches the latest posts from given category.';
const MAINTAINER = 'tomaszkane';
const PARAMETERS = array( array(
'category' => array(
'name' => 'Kategoria',
'type' => 'list',
'values' => array(
'Najnowsze (wszystkie)' => 'najnowsze',
'Newsy' => 'newsy',
'Recenzje' => 'recenzje',
'Teksty' => array(
'Publicystyka' => 'publicystyka',
'Zapowiedzi' => 'zapowiedzi',
'Już graliśmy' => 'juz-gralismy',
'Poradniki' => 'poradniki',
),
'Kultura' => 'kultura',
'Wideo' => 'wideo',
'Czasopismo' => 'czasopismo',
'Technologie' => array(
'Artykuły' => 'artykuly',
'Testy' => 'testy',
),
'Na luzie' => array(
'Konkursy' => 'konkursy',
'Nadgodziny' => 'nadgodziny',
)
)
))
);
public function collectData() {
$html = getSimpleHTMLDOM($this->getURI() . '/' . $this->getInput('category'));
$newsJson = $html->find('script#__NEXT_DATA__', 0)->innertext;
if (!$newsJson = json_decode($newsJson)) {
return;
}
$queriesIndex = $this->getInput('category') === 'najnowsze' ? 0 : 1;
foreach ($newsJson->props->pageProps->dehydratedState->queries[$queriesIndex]->state->data->results as $news) {
$item = array();
$item['uri'] = $this->getURI() . '/' . $news->category->slug . '/' . $news->slug;
$item['title'] = $news->title;
$item['timestamp'] = $news->publishedAt;
$item['author'] = $news->editor->fullName;
$item['content'] = $news->lead;
$item['enclosures'][] = $news->bannerUrl;
$item['categories'] = array_column($news->tags, 'name');
$item['uid'] = $news->id;
$this->items[] = $item;
}
}
}

21
bridges/CeskaTelevizeBridge.php Executable file → Normal file
View File

@@ -13,7 +13,7 @@ class CeskaTelevizeBridge extends BridgeAbstract {
'url' => array(
'name' => 'url to the show',
'required' => true,
'exampleValue' => 'https://www.ceskatelevize.cz/porady/1097181328-udalosti/dily/'
'exampleValue' => 'https://www.ceskatelevize.cz/porady/1097181328-udalosti/'
)
)
);
@@ -38,7 +38,7 @@ class CeskaTelevizeBridge extends BridgeAbstract {
public function collectData() {
$url = $this->getInput('url');
$validUrl = '/^(https:\/\/www\.ceskatelevize\.cz\/porady\/\d+-[a-z0-9-]+\/)(dily\/((nove|vysilani)\/)?)?$/';
$validUrl = '/^(https:\/\/www\.ceskatelevize\.cz\/porady\/\d+-[a-z0-9-]+\/)(bonus\/)?$/';
if (!preg_match($validUrl, $url, $match)) {
returnServerError('Invalid url');
}
@@ -46,8 +46,7 @@ class CeskaTelevizeBridge extends BridgeAbstract {
$category = isset($match[4]) ? $match[4] : 'nove';
$fixedUrl = "{$match[1]}dily/{$category}/";
$html = getSimpleHTMLDOM($fixedUrl)
or returnServerError('Could not request Česká televize');
$html = getSimpleHTMLDOM($fixedUrl);
$this->feedUri = $fixedUrl;
$this->feedName = str_replace('Přehled dílů — ', '', $this->fixChars($html->find('title', 0)->plaintext));
@@ -55,17 +54,17 @@ class CeskaTelevizeBridge extends BridgeAbstract {
$this->feedName .= " ({$category})";
}
foreach ($html->find('.episodes-broadcast-content a.episode_list_item') as $element) {
$itemTitle = $element->find('.episode_list_item-title', 0);
$itemContent = $element->find('.episode_list_item-desc', 0);
$itemDate = $element->find('.episode_list_item-date', 0);
foreach ($html->find('#episodeListSection a[data-testid=next-link]') as $element) {
$itemTitle = $element->find('h3', 0);
$itemContent = $element->find('div[class^=content-]', 0);
$itemDate = $element->find('div[class^=playTime-] span', 0);
$itemThumbnail = $element->find('img', 0);
$itemUri = self::URI . $element->getAttribute('href');
$item = array(
'title' => $this->fixChars($itemTitle->plaintext),
'uri' => $itemUri,
'content' => '<img src="https:' . $itemThumbnail->getAttribute('src') . '" /><br />'
'content' => '<img src="' . $itemThumbnail->getAttribute('src') . '" /><br />'
. $this->fixChars($itemContent->plaintext),
'timestamp' => $this->getUploadTimeFromString($itemDate->plaintext)
);
@@ -74,8 +73,8 @@ class CeskaTelevizeBridge extends BridgeAbstract {
}
}
public function getUri() {
return isset($this->feedUri) ? $this->feedUri : parent::getUri();
public function getURI() {
return isset($this->feedUri) ? $this->feedUri : parent::getURI();
}
public function getName() {

View File

@@ -1,28 +0,0 @@
<?php
class ChristianDailyReporterBridge extends BridgeAbstract {
const MAINTAINER = 'rogerdc';
const NAME = 'Christian Daily Reporter Unofficial RSS';
const URI = 'https://www.christiandailyreporter.com/';
const DESCRIPTION = 'The Unofficial Christian Daily Reporter RSS';
// const CACHE_TIMEOUT = 86400; // 1 day
public function getIcon() {
return self::URI . 'images/cdrfavicon.png';
}
public function collectData() {
$uri = 'https://www.christiandailyreporter.com/';
$html = getSimpleHTMLDOM($uri)
or returnServerError('Could not request Christian Daily Reporter.');
foreach($html->find('div.top p a,div.column p a') as $element) {
$item = array();
// Title
$item['title'] = $element->innertext;
// URL
$item['uri'] = $element->href;
$this->items[] = $item;
}
}
}

403
bridges/CodebergBridge.php Normal file
View File

@@ -0,0 +1,403 @@
<?php
class CodebergBridge extends BridgeAbstract {
const NAME = 'Codeberg Bridge';
const URI = 'https://codeberg.org/';
const DESCRIPTION = 'Returns commits, issues, pull requests or releases for a repository.';
const MAINTAINER = 'VerifiedJoseph';
const PARAMETERS = array(
'Commits' => array(
'branch' => array(
'name' => 'branch',
'type' => 'text',
'exampleValue' => 'main',
'required' => false,
'title' => 'Optional, main branch is used by default.',
),
),
'Issues' => array(),
'Issue Comments' => array(
'issueId' => array(
'name' => 'Issue ID',
'type' => 'text',
'required' => true,
'exampleValue' => '513',
)
),
'Pull Requests' => array(),
'Releases' => array(),
'global' => array(
'username' => array(
'name' => 'Username',
'type' => 'text',
'exampleValue' => 'Codeberg',
'title' => 'Username of account that the repository belongs to.',
'required' => true,
),
'repo' => array(
'name' => 'Repository',
'type' => 'text',
'exampleValue' => 'Community',
'required' => true,
)
)
);
const CACHE_TIMEOUT = 1800;
const TEST_DETECT_PARAMETERS = array(
'https://codeberg.org/Codeberg/Community/issues/507' => array(
'context' => 'Issue Comments', 'username' => 'Codeberg', 'repo' => 'Community', 'issueId' => '507'
),
'https://codeberg.org/Codeberg/Community/issues' => array(
'context' => 'Issues', 'username' => 'Codeberg', 'repo' => 'Community'
),
'https://codeberg.org/Codeberg/Community/pulls' => array(
'context' => 'Pull Requests', 'username' => 'Codeberg', 'repo' => 'Community'
),
'https://codeberg.org/Codeberg/Community/releases' => array(
'context' => 'Releases', 'username' => 'Codeberg', 'repo' => 'Community'
),
'https://codeberg.org/Codeberg/Community/commits/branch/master' => array(
'context' => 'Commits', 'username' => 'Codeberg', 'repo' => 'Community', 'branch' => 'master'
),
'https://codeberg.org/Codeberg/Community/commits' => array(
'context' => 'Commits', 'username' => 'Codeberg', 'repo' => 'Community'
)
);
private $defaultBranch = 'main';
private $issueTitle = '';
private $urlRegex = '/codeberg\.org\/([\w]+)\/([\w]+)(?:\/commits\/branch\/([\w]+))?/';
private $issuesUrlRegex = '/codeberg\.org\/([\w]+)\/([\w]+)\/issues/';
private $pullsUrlRegex = '/codeberg\.org\/([\w]+)\/([\w]+)\/pulls/';
private $releasesUrlRegex = '/codeberg\.org\/([\w]+)\/([\w]+)\/releases/';
private $issueCommentsUrlRegex = '/codeberg\.org\/([\w]+)\/([\w]+)\/issues\/([0-9]+)/';
public function detectParameters($url) {
$params = array();
// Issue Comments
if(preg_match($this->issueCommentsUrlRegex, $url, $matches)) {
$params['context'] = 'Issue Comments';
$params['username'] = $matches[1];
$params['repo'] = $matches[2];
$params['issueId'] = $matches[3];
return $params;
}
// Issues
if(preg_match($this->issuesUrlRegex, $url, $matches)) {
$params['context'] = 'Issues';
$params['username'] = $matches[1];
$params['repo'] = $matches[2];
return $params;
}
// Pull Requests
if(preg_match($this->pullsUrlRegex, $url, $matches)) {
$params['context'] = 'Pull Requests';
$params['username'] = $matches[1];
$params['repo'] = $matches[2];
return $params;
}
// Releases
if(preg_match($this->releasesUrlRegex, $url, $matches)) {
$params['context'] = 'Releases';
$params['username'] = $matches[1];
$params['repo'] = $matches[2];
return $params;
}
// Commits
if(preg_match($this->urlRegex, $url, $matches)) {
$params['context'] = 'Commits';
$params['username'] = $matches[1];
$params['repo'] = $matches[2];
if (isset($matches[3])) {
$params['branch'] = $matches[3];
}
return $params;
}
return null;
}
public function collectData() {
$html = getSimpleHTMLDOM($this->getURI());
$html = defaultLinkTo($html, $this->getURI());
switch($this->queriedContext) {
case 'Commits':
$this->extractCommits($html);
break;
case 'Issues':
$this->extractIssues($html);
break;
case 'Issue Comments':
$this->extractIssueComments($html);
break;
case 'Pull Requests':
$this->extractPulls($html);
break;
case 'Releases':
$this->extractReleases($html);
break;
default:
returnClientError('Invalid context: ' . $this->queriedContext);
}
}
public function getName() {
switch($this->queriedContext) {
case 'Commits':
if ($this->getBranch() === $this->defaultBranch) {
return $this->getRepo() . ' Commits';
}
return $this->getRepo() . ' Commits (' . $this->getBranch() . ' branch) - ' . self::NAME;
case 'Issues':
return $this->getRepo() . ' Issues - ' . self::NAME;
case 'Issue Comments':
return $this->issueTitle . ' - Issue Comments - ' . self::NAME;
case 'Pull Requests':
return $this->getRepo() . ' Pull Requests - ' . self::NAME;
case 'Releases':
return $this->getRepo() . ' Releases - ' . self::NAME;
default:
return parent::getName();
}
}
public function getURI() {
switch($this->queriedContext) {
case 'Commits':
return self::URI . $this->getRepo() . '/commits/branch/' . $this->getBranch();
case 'Issues':
return self::URI . $this->getRepo() . '/issues/';
case 'Issue Comments':
return self::URI . $this->getRepo() . '/issues/' . $this->getInput('issueId');
case 'Pull Requests':
return self::URI . $this->getRepo() . '/pulls';
case 'Releases':
return self::URI . $this->getRepo() . '/releases';
default:
return parent::getURI();
}
}
private function getBranch() {
if ($this->getInput('branch')) {
return $this->getInput('branch');
}
return $this->defaultBranch;
}
private function getRepo() {
return $this->getInput('username') . '/' . $this->getInput('repo');
}
/**
* Extract commits
*/
private function extractCommits($html) {
$table = $html->find('table#commits-table', 0);
$tbody = $table->find('tbody.commit-list', 0);
foreach ($tbody->find('tr') as $tr) {
$item = array();
$message = $tr->find('td.message', 0);
$item['title'] = $message->find('span.message-wrapper', 0)->plaintext;
$item['uri'] = $tr->find('td.sha', 0)->find('a', 0)->href;
$item['author'] = $tr->find('td.author', 0)->plaintext;
$item['timestamp'] = $tr->find('td', 3)->find('span', 0)->title;
if ($message->find('pre.commit-body', 0)) {
$message->find('pre.commit-body', 0)->style = '';
$item['content'] = $message->find('pre.commit-body', 0);
} else {
$item['content'] = '<blockquote>' . $item['title'] . '</blockquote>';
}
$this->items[] = $item;
}
}
/**
* Extract issues
*/
private function extractIssues($html) {
$div = $html->find('div.issue.list', 0);
foreach ($div->find('li.item') as $li) {
$item = array();
$number = trim($li->find('a.index,ml-0.mr-2', 0)->plaintext);
$item['title'] = $li->find('a.title', 0)->plaintext . ' (' . $number . ')';
$item['uri'] = $li->find('a.title', 0)->href;
$item['timestamp'] = $li->find('span.time-since', 0)->title;
$item['author'] = $li->find('div.desc', 0)->find('a', 1)->plaintext;
// Fetch issue page
$issuePage = getSimpleHTMLDOMCached($item['uri'], 3600);
$issuePage = defaultLinkTo($issuePage, self::URI);
$item['content'] = $issuePage->find('div.timeline-item.comment.first', 0)->find('div.render-content.markup', 0);
foreach ($li->find('a.ui.label') as $label) {
$item['categories'][] = $label->plaintext;
}
$this->items[] = $item;
}
}
/**
* Extract issue comments
*/
private function extractIssueComments($html) {
$this->issueTitle = $html->find('span#issue-title', 0)->plaintext
. ' (' . $html->find('span.index', 0)->plaintext . ')';
foreach ($html->find('div.timeline-item.comment') as $div) {
$item = array();
if ($div->class === 'timeline-item comment merge box') {
continue;
}
$item['title'] = $this->ellipsisTitle($div->find('div.render-content.markup', 0)->plaintext);
$item['uri'] = $div->find('span.text.grey', 0)->find('a', 1)->href;
$item['content'] = $div->find('div.render-content.markup', 0);
if ($div->find('div.dropzone-attachments', 0)) {
$item['content'] .= $div->find('div.dropzone-attachments', 0);
}
$item['author'] = $div->find('a.author', 0)->innertext;
$item['timestamp'] = $div->find('span.time-since', 0)->title;
$this->items[] = $item;
}
}
/**
* Extract pulls
*/
private function extractPulls($html) {
$div = $html->find('div.issue.list', 0);
foreach ($div->find('li.item') as $li) {
$item = array();
$number = trim($li->find('a.index,ml-0.mr-2', 0)->plaintext);
$item['title'] = $li->find('a.title', 0)->plaintext . ' (' . $number . ')';
$item['uri'] = $li->find('a.title', 0)->href;
$item['timestamp'] = $li->find('span.time-since', 0)->title;
$item['author'] = $li->find('div.desc', 0)->find('a', 1)->plaintext;
// Fetch pull request page
$pullRequestPage = getSimpleHTMLDOMCached($item['uri'], 3600);
$pullRequestPage = defaultLinkTo($pullRequestPage, self::URI);
$item['content'] = $pullRequestPage->find('ui.timeline', 0)->find('div.render-content.markup', 0);
foreach ($li->find('a.ui.label') as $label) {
$item['categories'][] = $label->plaintext;
}
$this->items[] = $item;
}
}
/**
* Extract releases
*/
private function extractReleases($html) {
$ul = $html->find('ul#release-list', 0);
foreach ($ul->find('li.ui.grid') as $li) {
$item = array();
$item['title'] = $li->find('h4', 0)->plaintext;
$item['uri'] = $li->find('h4', 0)->find('a', 0)->href;
$tag = $this->stripSvg($li->find('span.tag', 0));
$commit = $this->stripSvg($li->find('span.commit', 0));
$downloads = $this->extractDownloads($li->find('details.download', 0));
$item['content'] = $li->find('div.markup.desc', 0);
$item['content'] .= <<<HTML
<strong>Tag</strong>
<p>{$tag}</p>
<strong>Commit</strong>
<p>{$commit}</p>
{$downloads}
HTML;
$item['timestamp'] = $li->find('span.time', 0)->find('span', 0)->title;
$item['author'] = $li->find('span.author', 0)->find('a', 0)->plaintext;
$this->items[] = $item;
}
}
/**
* Extract downloads for a releases
*/
private function extractDownloads($html, $skipFirst = false) {
$downloads = '';
foreach ($html->find('a') as $index => $a) {
if ($skipFirst === true && $index === 0) {
continue;
}
$downloads .= <<<HTML
<a href="{$a->herf}">{$a->plaintext}</a><br>
HTML;
}
return <<<EOD
<strong>Downloads</strong>
<p>{$downloads}</p>
EOD;
}
/**
* Ellipsis title to first 100 characters
*/
private function ellipsisTitle($text) {
$length = 100;
if (strlen($text) > $length) {
$text = explode('<br>', wordwrap($text, $length, '<br>'));
return $text[0] . '...';
}
return $text;
}
/**
* Strip SVG tag
*/
private function stripSvg($html) {
if ($html->find('svg', 0)) {
$html->find('svg', 0)->outertext = '';
}
return $html;
}
}

View File

@@ -34,8 +34,7 @@ class CollegeDeFranceBridge extends BridgeAbstract {
* </li>
*/
$html = getSimpleHTMLDOM(self::URI
. 'components/search-audiovideo.jsp?fulltext=&siteid=1156951719600&lang=FR&type=all')
or returnServerError('Could not request CollegeDeFrance.');
. 'components/search-audiovideo.jsp?fulltext=&siteid=1156951719600&lang=FR&type=all');
foreach($html->find('a[data-target]') as $element) {
$item = array();

View File

@@ -7,8 +7,11 @@ class ComboiosDePortugalBridge extends BridgeAbstract {
const MAINTAINER = 'somini';
public function collectData() {
$html = getSimpleHTMLDOM($this->getURI() . '/consultar-horarios/avisos')
or returnServerError('Could not load content');
# Do not verify SSL certificate (the server doesn't send the intermediate)
# https://github.com/RSS-Bridge/rss-bridge/issues/2397
$html = getSimpleHTMLDOM($this->getURI() . '/consultar-horarios/avisos', array(), array(
CURLOPT_SSL_VERIFYPEER => 0,
));
foreach($html->find('.warnings-table a') as $element) {
$item = array();

View File

@@ -3,36 +3,33 @@ class ComicsKingdomBridge extends BridgeAbstract {
const MAINTAINER = 'stjohnjohnson';
const NAME = 'Comics Kingdom Unofficial RSS';
const URI = 'https://www.comicskingdom.com/';
const URI = 'https://comicskingdom.com/';
const CACHE_TIMEOUT = 21600; // 6h
const DESCRIPTION = 'Comics Kingdom Unofficial RSS';
const PARAMETERS = array( array(
'comicname' => array(
'name' => 'comicname',
'type' => 'text',
'exampleValue' => 'mutts',
'title' => 'The name of the comic in the URL after https://comicskingdom.com/',
'required' => true
)
));
public function collectData(){
$html = getSimpleHTMLDOM($this->getURI(), array(), array(), true, false)
or returnServerError('Could not request Comics Kingdom: ' . $this->getURI());
$html = getSimpleHTMLDOM($this->getURI(), array(), array(), true, false);
// Get author from first page
$author = $html->find('div.author p', 0)->plaintext
or returnServerError('Comics Kingdom comic does not exist: ' . $this->getURI());;
$author = $html->find('div.author p', 0);;
// Get current date/link
$link = $html->find('meta[property=og:url]', 0)->content;
for($i = 0; $i < 5; $i++) {
$link = $html->find('meta[property=og:url]', -1)->content;
for($i = 0; $i < 3; $i++) {
$item = array();
$page = getSimpleHTMLDOM($link)
or returnServerError('Could not request Comics Kingdom: ' . $link);
$page = getSimpleHTMLDOM($link);
$imagelink = $page->find('meta[property=og:image]', 0)->content;
$prevSlug = $page->find('slider-arrow[:is-left-arrow=true]', 0);
$link = $this->getURI() . '/' . $prevSlug->getAttribute('date-slug');
$date = explode('/', $link);
@@ -44,6 +41,8 @@ class ComicsKingdomBridge extends BridgeAbstract {
$item['content'] = '<img src="' . $imagelink . '" />';
$this->items[] = $item;
$link = $page->find('div.comic-viewer-inline a', 0)->href;
if (empty($link)) break; // allow bridge to continue if there's less than 3 comics
}
}

View File

@@ -1,96 +0,0 @@
<?php
class ContainerLinuxReleasesBridge extends BridgeAbstract {
const MAINTAINER = 'captn3m0';
const NAME = 'Core OS Container Linux Releases Bridge';
const URI = 'https://coreos.com/releases/';
const DESCRIPTION = 'Returns the releases notes for Container Linux';
const STABLE = 'stable';
const BETA = 'beta';
const ALPHA = 'alpha';
const PARAMETERS = array(
array(
'channel' => array(
'name' => 'Release Channel',
'type' => 'list',
'defaultValue' => self::STABLE,
'values' => array(
'Stable' => self::STABLE,
'Beta' => self::BETA,
'Alpha' => self::ALPHA,
),
)
)
);
private function getReleaseFeed($jsonUrl) {
$json = getContents($jsonUrl)
or returnServerError('Could not request Core OS Website.');
return json_decode($json, true);
}
public function getIcon() {
return 'https://coreos.com/assets/ico/favicon.png';
}
public function collectData() {
$data = $this->getReleaseFeed($this->getJsonUri());
foreach ($data as $releaseVersion => $release) {
$item = array();
$item['uri'] = "https://coreos.com/releases/#$releaseVersion";
$item['title'] = $releaseVersion;
$content = $release['release_notes'];
$content .= <<<EOT
Major Software:
* Kernel: {$release['major_software']['kernel'][0]}
* Docker: {$release['major_software']['docker'][0]}
* etcd: {$release['major_software']['etcd'][0]}
EOT;
$item['timestamp'] = strtotime($release['release_date']);
// Based on https://gist.github.com/jbroadway/2836900
// Links
$regex = '/\[([^\[]+)\]\(([^\)]+)\)/';
$replacement = '<a href=\'\2\'>\1</a>';
$item['content'] = preg_replace($regex, $replacement, $content);
// Headings
$regex = '/^(.*)\:\s?$/m';
$replacement = '<h3>\1</h3>';
$item['content'] = preg_replace($regex, $replacement, $item['content']);
// Lists
$regex = '/\n\s*[\*|\-](.*)/';
$item['content'] = preg_replace_callback ($regex, function($regs) {
$item = $regs[1];
return sprintf ('<ul><li>%s</li></ul>', trim ($item));
}, $item['content']);
$this->items[] = $item;
}
}
private function getJsonUri() {
$channel = $this->getInput('channel');
return "https://coreos.com/releases/releases-$channel.json";
}
public function getURI() {
return self::URI;
}
public function getName(){
if(!is_null($this->getInput('channel'))) {
return 'Container Linux Releases: ' . $this->getInput('channel') . ' Channel';
}
return parent::getName();
}
}

View File

@@ -8,8 +8,7 @@ class CopieDoubleBridge extends BridgeAbstract {
const DESCRIPTION = 'CopieDouble';
public function collectData(){
$html = getSimpleHTMLDOM(self::URI)
or returnServerError('Could not request CopieDouble.');
$html = getSimpleHTMLDOM(self::URI);
$table = $html->find('table table', 2);

View File

@@ -1,55 +1,27 @@
<?php
class CourrierInternationalBridge extends BridgeAbstract {
class CourrierInternationalBridge extends FeedExpander {
const MAINTAINER = 'teromene';
const NAME = 'Courrier International Bridge';
const URI = 'https://www.courrierinternational.com/';
const CACHE_TIMEOUT = 300; // 5 min
const DESCRIPTION = 'Courrier International bridge';
const DESCRIPTION = 'Returns the newest articles';
public function collectData(){
$html = getSimpleHTMLDOM(self::URI)
or returnServerError('Error.');
$this->collectExpandableDatas(static::URI . 'feed/all/rss.xml', 20);
}
$element = $html->find('article');
$article_count = 1;
protected function parseItem($feedItem){
$item = parent::parseItem($feedItem);
foreach($element as $article) {
$item = array();
$item['uri'] = $article->parent->getAttribute('href');
if(strpos($item['uri'], 'http') === false) {
$item['uri'] = self::URI . $item['uri'];
}
$page = getSimpleHTMLDOMCached($item['uri']);
$content = $page->find('.article-text', 0);
if(!$content) {
$content = $page->find('.depeche-text', 0);
}
$item['content'] = sanitize($content);
$item['title'] = strip_tags($article->find('.title', 0));
$dateTime = date_parse($page->find('time', 0));
$item['timestamp'] = mktime(
$dateTime['hour'],
$dateTime['minute'],
$dateTime['second'],
$dateTime['month'],
$dateTime['day'],
$dateTime['year']
);
$this->items[] = $item;
$article_count ++;
if($article_count > 5)
break;
$articlePage = getSimpleHTMLDOMCached($feedItem->link);
$content = $articlePage->find('.article-text', 0);
if(!$content) {
$content = $articlePage->find('.depeche-text', 0);
}
$item['content'] = sanitize($content);
return $item;
}
}

View File

@@ -0,0 +1,105 @@
<?php
class CraigslistBridge extends BridgeAbstract {
const MAINTAINER = 'Yaman Qalieh';
const NAME = 'Craigslist Bridge';
const URI = 'https://craigslist.org/';
const DESCRIPTION = 'Returns craigslist search results';
const PARAMETERS = array( array(
'region' => array(
'name' => 'Region',
'title' => 'The subdomain before craigslist.org in the URL',
'exampleValue' => 'sfbay',
'required' => true
),
'search' => array(
'name' => 'Search Query',
'title' => 'Everything in the URL after /search/',
'exampleValue' => 'sya?query=laptop',
'required' => true
),
'limit' => array(
'name' => 'Number of Posts',
'type' => 'number',
'title' => 'The maximum number of posts is 120. Use 0 for unlimited posts.',
'defaultValue' => '25'
)
));
const TEST_DETECT_PARAMETERS = array(
'https://sfbay.craigslist.org/search/sya?query=laptop' => array(
'region' => 'sfbay', 'search' => 'sya?query=laptop'
),
'https://newyork.craigslist.org/search/sss?query=32gb+flash+drive&bundleDuplicates=1&max_price=20' => array(
'region' => 'newyork', 'search' => 'sss?query=32gb+flash+drive&bundleDuplicates=1&max_price=20'
),
);
const URL_REGEX = '/^https:\/\/(?<region>\w+).craigslist.org\/search\/(?<search>.+)/';
public function detectParameters($url) {
if(preg_match(self::URL_REGEX, $url, $matches)) {
$params = array();
$params['region'] = $matches['region'];
$params['search'] = $matches['search'];
return $params;
}
}
public function getURI() {
if (!is_null($this->getInput('region'))) {
$domain = 'https://' . $this->getInput('region') . '.craigslist.org/search/';
return urljoin($domain, $this->getInput('search'));
}
return parent::getURI();
}
public function collectData() {
$uri = $this->getURI();
$html = getSimpleHTMLDOM($uri);
// Check if no results page is shown (nearby results)
if ($html->find('.displaycountShow', 0)->plaintext == '0') {
return;
}
// Search for "more from nearby areas" banner in order to skip those results
$results = $html->find('.result-row, h4.nearby');
// Limit the number of posts
if ($this->getInput('limit') > 0) {
$results = array_slice($results, 0, $this->getInput('limit'));
}
foreach($results as $post) {
// Skip "nearby results" banner and results
if ($post->tag == 'h4') {
break;
}
$item = array();
$heading = $post->find('.result-heading a', 0);
$item['uri'] = $heading->href;
$item['title'] = $heading->plaintext;
$item['timestamp'] = $post->find('.result-date', 0)->datetime;
$item['uid'] = $heading->id;
$item['content'] = $post->find('.result-price', 0)->plaintext . ' '
. $post->find('.result-hood', 0)->plaintext;
$images = $post->find('.result-image[data-ids]', 0);
if (!is_null($images)) {
$item['content'] .= '<br>';
foreach(explode(',', $images->getAttribute('data-ids')) as $image) {
// Remove leading 3: from each image id
$id = substr($image, 2);
$image_uri = 'https://images.craigslist.org/' . $id . '_300x300.jpg';
$item['content'] .= '<img src="' . $image_uri . '">';
$item['enclosures'][] = $image_uri;
}
}
$this->items[] = $item;
}
}
}

View File

@@ -6,40 +6,39 @@ class CryptomeBridge extends BridgeAbstract {
const URI = 'https://cryptome.org/';
const CACHE_TIMEOUT = 21600; //6h
const DESCRIPTION = 'Returns the N most recent documents.';
const PARAMETERS = array( array(
'n' => array(
'name' => 'number of elements',
'type' => 'number',
'defaultValue' => 20,
'required' => true,
'exampleValue' => 10
)
));
public function getIcon() {
return self::URI . '/favicon.ico';
}
public function collectData(){
$html = getSimpleHTMLDOM(self::URI)
or returnServerError('Could not request Cryptome.');
$html = getSimpleHTMLDOM(self::URI);
$number = $this->getInput('n');
/* number of documents */
if(!empty($number)) {
$num = min($number, 20);
}
foreach($html->find('pre') as $element) {
for($i = 0; $i < $num; ++$i) {
$i = 0;
foreach($html->find('pre', 1)->find('b') as $element) {
foreach($element->find('a') as $element1) {
$item = array();
$item['uri'] = self::URI . substr($element->find('a', $i)->href, 20);
$item['title'] = substr($element->find('b', $i)->plaintext, 22);
$item['content'] = preg_replace(
'#http://cryptome.org/#',
self::URI,
$element->find('b', $i)->innertext
);
$item['uri'] = $element1->href;
$item['title'] = $element->plaintext;
$this->items[] = $item;
if ($i > $num) {
break 2;
}
$i++;
}
break;
}
}
}

View File

@@ -19,8 +19,7 @@ class CuriousCatBridge extends BridgeAbstract {
$url = self::URI . '/api/v2/profile?username=' . urlencode($this->getInput('username'));
$apiJson = getContents($url)
or returnServerError('Could not request: ' . $url);
$apiJson = getContents($url);
$apiData = json_decode($apiJson, true);

View File

@@ -11,19 +11,22 @@ class DailymotionBridge extends BridgeAbstract {
'By username' => array(
'u' => array(
'name' => 'username',
'required' => true
'required' => true,
'exampleValue' => 'moviepilot',
)
),
'By playlist id' => array(
'p' => array(
'name' => 'playlist id',
'required' => true
'required' => true,
'exampleValue' => 'x6xyc6',
)
),
'From search results' => array(
's' => array(
'name' => 'Search keyword',
'required' => true
'required' => true,
'exampleValue' => 'matrix',
),
'pa' => array(
'name' => 'Page',
@@ -46,8 +49,7 @@ class DailymotionBridge extends BridgeAbstract {
if ($this->queriedContext === 'By username' || $this->queriedContext === 'By playlist id') {
$apiJson = getContents($this->getApiUrl())
or returnServerError('Could not request: ' . $this->getApiUrl());
$apiJson = getContents($this->getApiUrl());
$apiData = json_decode($apiJson, true);
@@ -72,8 +74,7 @@ class DailymotionBridge extends BridgeAbstract {
if ($this->queriedContext === 'From search results') {
$html = getSimpleHTMLDOM($this->getURI())
or returnServerError('Could not request Dailymotion.');
$html = getSimpleHTMLDOM($this->getURI());
foreach($html->find('div.media a.preview_link') as $element) {
$item = array();
@@ -180,8 +181,7 @@ class DailymotionBridge extends BridgeAbstract {
$url = self::URI . 'playlist/' . $id;
$html = getSimpleHTMLDOM($url)
or returnServerError('Could not request: ' . $url);
$html = getSimpleHTMLDOM($url);
$title = $html->find('meta[property=og:title]', 0)->getAttribute('content');
return $title;

View File

@@ -44,21 +44,20 @@ class DanbooruBridge extends BridgeAbstract {
$item['postid'] = (int)preg_replace('/[^0-9]/', '', $element->getAttribute(static::IDATTRIBUTE));
$item['timestamp'] = time();
$thumbnailUri = $element->find('img', 0)->src;
$item['tags'] = $this->getTags($element);
$item['categories'] = array_filter(explode(' ', $this->getTags($element)));
$item['title'] = $this->getName() . ' | ' . $item['postid'];
$item['content'] = '<a href="'
. $item['uri']
. '"><img src="'
. $thumbnailUri
. '" /></a><br>Tags: '
. $item['tags'];
. $this->getTags($element);
return $item;
}
public function collectData(){
$content = getContents($this->getFullURI())
or returnServerError('Could not request ' . $this->getName());
$content = getContents($this->getFullURI());
$html = Fix_Simple_Html_Dom::str_get_html($content);

View File

@@ -9,8 +9,7 @@ class DansTonChatBridge extends BridgeAbstract {
public function collectData(){
$html = getSimpleHTMLDOM(self::URI . 'latest.html')
or returnServerError('Could not request DansTonChat.');
$html = getSimpleHTMLDOM(self::URI . 'latest.html');
foreach($html->find('div.item') as $element) {
$item = array();

View File

@@ -48,22 +48,24 @@ class DarkReadingBridge extends FeedExpander {
if ($feed_id != '000') {
$feed_url .= '?f_n=' . $feed_id . '&f_ln=' . $feed_name;
}
$this->collectExpandableDatas($feed_url);
$this->collectExpandableDatas($feed_url, 20);
}
protected function parseItem($newsItem){
$item = parent::parseItem($newsItem);
if (empty($item['content']))
return null; //ignore dummy articles
$article = getSimpleHTMLDOMCached($item['uri'])
or returnServerError('Could not request Dark Reading: ' . $item['uri']);
$article = getSimpleHTMLDOMCached($item['uri']);
$item['content'] = $this->extractArticleContent($article);
$item['enclosures'] = array(); //remove author profile picture
$image = $article->find('meta[property="og:image"]', 0);
if (is_object($image)) {
$image = $image->content;
$item['enclosures'] = array($image);
}
return $item;
}
private function extractArticleContent($article){
$content = $article->find('div#article-main', 0)->innertext;
$content = $article->find('div.article-content', 0)->innertext;
foreach (array(
'<div class="divsplitter',
@@ -74,8 +76,6 @@ class DarkReadingBridge extends FeedExpander {
$content = stripRecursiveHTMLSection($content, 'div', $div_start);
}
$content = stripWithDelimiters($content, '<h1 ', '</h1>');
return $content;
}
}

View File

@@ -9,8 +9,7 @@ class DaveRamseyBlogBridge extends BridgeAbstract {
public function collectData()
{
$html = getSimpleHTMLDOM(self::URI)
or returnServerError('Could not request daveramsey.com.');
$html = getSimpleHTMLDOM(self::URI);
foreach ($html->find('.Post') as $element) {
$this->items[] = array(

View File

@@ -9,7 +9,14 @@ class DavesTrailerPageBridge extends BridgeAbstract {
$html = getSimpleHTMLDOM(static::URI)
or returnClientError('No results for this query.');
foreach ($html->find('tr[!align]') as $tr) {
$curr_date = null;
foreach ($html->find('tr') as $tr) {
// If it's a date row, update the current date
if ($tr->align == 'center') {
$curr_date = $tr->plaintext;
continue;
}
$item = array();
// title
@@ -21,6 +28,9 @@ class DavesTrailerPageBridge extends BridgeAbstract {
// uri
$item['uri'] = $tr->find('a', 3)->getAttribute('href');
// date: parsed by FeedItem using strtotime
$item['timestamp'] = $curr_date;
$this->items[] = $item;
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -2,7 +2,7 @@
class DerpibooruBridge extends BridgeAbstract {
const NAME = 'Derpibooru Bridge';
const URI = 'https://derpibooru.org/';
const DESCRIPTION = 'Returns newest posts from a Derpibooru search';
const DESCRIPTION = 'Returns newest images from a Derpibooru search';
const CACHE_TIMEOUT = 300; // 5min
const MAINTAINER = 'Roliga';
@@ -24,7 +24,8 @@ class DerpibooruBridge extends BridgeAbstract {
),
'q' => array(
'name' => 'Query',
'required' => true
'required' => true,
'exampleValue' => 'dog',
)
)
);
@@ -73,40 +74,42 @@ class DerpibooruBridge extends BridgeAbstract {
public function collectData(){
$queryJson = json_decode(getContents(
self::URI
. 'search.json?filter_id='
. 'api/v1/json/search/images?filter_id='
. urlencode($this->getInput('f'))
. '&q='
. urlencode($this->getInput('q'))
)) or returnServerError('Failed to query Derpibooru');
));
foreach($queryJson->search as $post) {
foreach($queryJson->images as $post) {
$item = array();
$postUri = self::URI . $post->id;
$item['uri'] = $postUri;
$item['title'] = $post->id;
$item['title'] = $post->name;
$item['timestamp'] = strtotime($post->created_at);
$item['author'] = $post->uploader;
$item['enclosures'] = array('https:' . $post->image);
$item['categories'] = explode(', ', $post->tags);
$item['enclosures'] = array($post->view_url);
$item['categories'] = $post->tags;
$item['content'] = '<p><a href="' // image preview
. $postUri
. '"><img src="https:'
. '"><img src="'
. $post->representations->medium
. '"></a></p><p>' // description
. $post->description
. '</p><p><b>Size:</b> ' // image size
. $post->width
. 'x'
. $post->height
. '<br><b>Source:</b> <a href="' // source link
. $post->height;
// source link
if ($post->source_url != null) {
$item['content'] .= '<br><b>Source:</b> <a href="'
. $post->source_url
. '">'
. $post->source_url
. '</a></p>';
};
$this->items[] = $item;
}
}

View File

@@ -16,7 +16,7 @@ class DesoutterBridge extends BridgeAbstract {
'name' => 'Language',
'type' => 'list',
'title' => 'Select your language',
'defaultValue' => 'Corporate',
'defaultValue' => 'https://www.desouttertools.com/about-desoutter/news-events',
'values' => array(
'Corporate'
=> 'https://www.desouttertools.com/about-desoutter/news-events',
@@ -120,6 +120,7 @@ class DesoutterBridge extends BridgeAbstract {
'limit' => array(
'name' => 'Limit',
'type' => 'number',
'required' => true,
'defaultValue' => 3,
'title' => "Maximum number of items to return in the feed.\n0 = unlimited"
)
@@ -155,8 +156,7 @@ class DesoutterBridge extends BridgeAbstract {
}
*/
$html = getSimpleHTMLDOM($this->getURI())
or returnServerError('Could not request ' . $this->getURI());
$html = getSimpleHTMLDOM($this->getURI());
$html = defaultLinkTo($html, $this->getURI());
@@ -184,8 +184,7 @@ class DesoutterBridge extends BridgeAbstract {
}
private function getFullNewsArticle($uri) {
$html = getSimpleHTMLDOMCached($uri)
or returnServerError('Unable to load full article!');
$html = getSimpleHTMLDOMCached($uri);
$html = defaultLinkTo($html, $this->getURI());
@@ -199,8 +198,7 @@ class DesoutterBridge extends BridgeAbstract {
* @return void
*/
private function extractNewsLanguages() {
$html = getSimpleHTMLDOMCached('https://www.desouttertools.com/about-desoutter/news-events')
or returnServerError('Error loading news!');
$html = getSimpleHTMLDOMCached('https://www.desouttertools.com/about-desoutter/news-events');
$html = defaultLinkTo($html, static::URI);
@@ -225,8 +223,7 @@ class DesoutterBridge extends BridgeAbstract {
* @return void
*/
private function extractIndustryLanguages() {
$html = getSimpleHTMLDOMCached('https://www.desouttertools.com/industry-4-0/news')
or returnServerError('Error loading news!');
$html = getSimpleHTMLDOMCached('https://www.desouttertools.com/industry-4-0/news');
$html = defaultLinkTo($html, static::URI);

View File

@@ -45,8 +45,7 @@ apple-icon-5c6fa9f2bce280428589c6195b7f1924206a53b782b371cfe2d02da932c8c173.png'
}
public function collectData() {
$html = getSimpleHTMLDOMCached($this->getURI())
or returnServerError('Could not request ' . $this->getURI());
$html = getSimpleHTMLDOMCached($this->getURI());
$html = defaultLinkTo($html, static::URI);
@@ -95,8 +94,7 @@ EOD;
}
private function getFullArticle($url) {
$html = getSimpleHTMLDOMCached($url)
or returnServerError('Unable to load article from "' . $url . '"!');
$html = getSimpleHTMLDOMCached($url);
$html = defaultLinkTo($html, static::URI);

View File

@@ -8,6 +8,7 @@ class DiarioDeNoticiasBridge extends BridgeAbstract {
'Tag' => array(
'n' => array(
'name' => 'Tag Name',
'required' => true,
'exampleValue' => 'rogerio-casanova',
)
)
@@ -42,6 +43,7 @@ class DiarioDeNoticiasBridge extends BridgeAbstract {
}
return $name;
}
public function getURI() {
switch($this->queriedContext) {
case 'Tag':
@@ -55,8 +57,7 @@ class DiarioDeNoticiasBridge extends BridgeAbstract {
public function collectData() {
$archives = self::getURI();
$html = getSimpleHTMLDOMCached($archives)
or returnServerError('Could not load content');
$html = getSimpleHTMLDOMCached($archives);
foreach($html->find('article') as $element) {
$item = array();

View File

@@ -27,8 +27,7 @@ class DiarioDoAlentejoBridge extends BridgeAbstract {
public function collectData(){
/* This is slow as molasses (>30s!), keep the cache timeout high to avoid killing the host */
$html = getSimpleHTMLDOMCached($this->getURI() . '/pt/noticias-listagem.aspx')
or returnServerError('Could not load content');
$html = getSimpleHTMLDOMCached($this->getURI() . '/pt/noticias-listagem.aspx');
foreach($html->find('.list_news .item') as $element) {
$item = array();

View File

@@ -97,8 +97,7 @@ class DiceBridge extends BridgeAbstract {
$uri .= '&telecommute=true';
}
$html = getSimpleHTMLDOM($uri)
or returnServerError('Could not request Dice.');
$html = getSimpleHTMLDOM($uri);
foreach($html->find('div.complete-serp-result-div') as $element) {
$item = array();
// Title

View File

@@ -9,8 +9,7 @@ class DilbertBridge extends BridgeAbstract {
public function collectData(){
$html = getSimpleHTMLDOM(self::URI)
or returnServerError('Could not request Dilbert: ' . self::URI);
$html = getSimpleHTMLDOM(self::URI);
foreach($html->find('section.comic-item') as $element) {

View File

@@ -11,18 +11,26 @@ class DiscogsBridge extends BridgeAbstract {
'artistid' => array(
'name' => 'Artist ID',
'type' => 'number',
'required' => true,
'exampleValue' => '28104',
'title' => 'Only the ID from an artist page. EG /artist/28104-Aesop-Rock is 28104'
)
),
'Label Releases' => array(
'labelid' => array(
'name' => 'Label ID',
'type' => 'number',
'required' => true,
'exampleValue' => '8201',
'title' => 'Only the ID from a label page. EG /label/8201-Rhymesayers-Entertainment is 8201'
)
),
'User Wantlist' => array(
'username_wantlist' => array(
'name' => 'Username',
'type' => 'text',
'required' => true,
'exampleValue' => 'TheBlindMaster',
)
),
'User Folder' => array(
@@ -44,13 +52,11 @@ class DiscogsBridge extends BridgeAbstract {
if(!empty($this->getInput('artistid'))) {
$data = getContents('https://api.discogs.com/artists/'
. $this->getInput('artistid')
. '/releases?sort=year&sort_order=desc')
or returnServerError('Unable to query discogs !');
. '/releases?sort=year&sort_order=desc');
} elseif(!empty($this->getInput('labelid'))) {
$data = getContents('https://api.discogs.com/labels/'
. $this->getInput('labelid')
. '/releases?sort=year&sort_order=desc')
or returnServerError('Unable to query discogs !');
. '/releases?sort=year&sort_order=desc');
}
$jsonData = json_decode($data, true);
@@ -76,8 +82,7 @@ class DiscogsBridge extends BridgeAbstract {
if(!empty($this->getInput('username_wantlist'))) {
$data = getContents('https://api.discogs.com/users/'
. $this->getInput('username_wantlist')
. '/wants?sort=added&sort_order=desc')
or returnServerError('Unable to query discogs !');
. '/wants?sort=added&sort_order=desc');
$jsonData = json_decode($data, true)['wants'];
} elseif(!empty($this->getInput('username_folder'))) {
@@ -85,8 +90,7 @@ class DiscogsBridge extends BridgeAbstract {
. $this->getInput('username_folder')
. '/collection/folders/'
. $this->getInput('folderid')
. '/releases?sort=added&sort_order=desc')
or returnServerError('Unable to query discogs !');
. '/releases?sort=added&sort_order=desc');
$jsonData = json_decode($data, true)['releases'];
}
foreach($jsonData as $element) {

165
bridges/DockerHubBridge.php Normal file
View File

@@ -0,0 +1,165 @@
<?php
class DockerHubBridge extends BridgeAbstract {
const NAME = 'Docker Hub Bridge';
const URI = 'https://hub.docker.com';
const DESCRIPTION = 'Returns new images for a container';
const MAINTAINER = 'VerifiedJoseph';
const PARAMETERS = array(
'User Submitted Image' => array(
'user' => array(
'name' => 'User',
'type' => 'text',
'required' => true,
'exampleValue' => 'rssbridge',
),
'repo' => array(
'name' => 'Repository',
'type' => 'text',
'required' => true,
'exampleValue' => 'rss-bridge',
)
),
'Official Image' => array(
'repo' => array(
'name' => 'Repository',
'type' => 'text',
'required' => true,
'exampleValue' => 'postgres',
)
),
);
const CACHE_TIMEOUT = 3600; // 1 hour
private $apiURL = 'https://hub.docker.com/v2/repositories/';
private $imageUrlRegex = '/hub\.docker\.com\/r\/([\w]+)\/([\w-]+)\/?/';
private $officialImageUrlRegex = '/hub\.docker\.com\/_\/([\w-]+)\/?/';
public function detectParameters($url) {
$params = array();
// user submitted image
if(preg_match($this->imageUrlRegex, $url, $matches)) {
$params['context'] = 'User Submitted Image';
$params['user'] = $matches[1];
$params['repo'] = $matches[2];
return $params;
}
// official image
if(preg_match($this->officialImageUrlRegex, $url, $matches)) {
$params['context'] = 'Official Image';
$params['repo'] = $matches[1];
return $params;
}
return null;
}
public function collectData() {
$json = getContents($this->getApiUrl());
$data = json_decode($json, false);
foreach ($data->results as $result) {
$item = array();
$lastPushed = date('Y-m-d H:i:s', strtotime($result->tag_last_pushed));
$item['title'] = $result->name;
$item['uid'] = $result->id;
$item['uri'] = $this->getTagUrl($result->name);
$item['author'] = $result->last_updater_username;
$item['timestamp'] = $result->tag_last_pushed;
$item['content'] = <<<EOD
<Strong>Tag</strong><br>
<p>{$result->name}</p>
<Strong>Last pushed</strong><br>
<p>{$lastPushed}</p>
<Strong>Images</strong><br>
{$this->getImages($result)}
EOD;
$this->items[] = $item;
}
}
public function getURI() {
if ($this->queriedContext === 'Official Image') {
return self::URI . '/_/' . $this->getRepo();
}
if ($this->getInput('repo')) {
return self::URI . '/r/' . $this->getRepo();
}
return parent::getURI();
}
public function getName() {
if ($this->getInput('repo')) {
return $this->getRepo() . ' - Docker Hub';
}
return parent::getName();
}
private function getRepo() {
if ($this->queriedContext === 'Official Image') {
return $this->getInput('repo');
}
return $this->getInput('user') . '/' . $this->getInput('repo');
}
private function getApiUrl() {
if ($this->queriedContext === 'Official Image') {
return $this->apiURL . 'library/' . $this->getRepo() . '/tags/?page_size=25&page=1';
}
return $this->apiURL . $this->getRepo() . '/tags/?page_size=25&page=1';
}
private function getLayerUrl($name, $digest) {
if ($this->queriedContext === 'Official Image') {
return self::URI . '/layers/' . $this->getRepo() . '/library/' .
$this->getRepo() . '/' . $name . '/images/' . $digest;
}
return self::URI . '/layers/' . $this->getRepo() . '/' . $name . '/images/' . $digest;
}
private function getTagUrl($name) {
if ($this->queriedContext === 'Official Image') {
return self::URI . '/_/' . $this->getRepo() . '?tab=tags&name=' . $name;
}
return self::URI . '/r/' . $this->getRepo() . '/tags?name=' . $name;
}
private function getImages($result) {
$html = <<<EOD
<table style="width:300px;"><thead><tr><th>Digest</th><th>OS/architecture</th></tr></thead></tbody>
EOD;
foreach ($result->images as $image) {
$layersUrl = $this->getLayerUrl($result->name, $image->digest);
$id = $this->getShortDigestId($image->digest);
$html .= <<<EOD
<tr>
<td><a href="{$layersUrl}">{$id}</a></td>
<td>{$image->os}/{$image->architecture}</td>
</tr>
EOD;
}
return $html . '</tbody></table>';
}
private function getShortDigestId($digest) {
$parts = explode(':', $digest);
return substr($parts[1], 0, 12);
}
}

View File

@@ -23,6 +23,7 @@ class DonnonsBridge extends BridgeAbstract {
'p' => array(
'name' => 'Nombre de pages à scanner',
'type' => 'number',
'required' => true,
'defaultValue' => 5,
'title' => 'Indique le nombre de pages de donnons.org qui seront scannées'
)
@@ -40,8 +41,7 @@ class DonnonsBridge extends BridgeAbstract {
private function collectDataByPage($page) {
$uri = $this->getPageURI($page);
$html = getSimpleHTMLDOM($uri)
or returnServerError('No results for this query.');
$html = getSimpleHTMLDOM($uri);
$searchDiv = $html->find('div[id=search]', 0);
@@ -67,7 +67,9 @@ class DonnonsBridge extends BridgeAbstract {
$region = $json['availableAtOrFrom']['address']['addressRegion'];
// Grab info from HTML
$imageSrc = $element->find('img.ima-center', 0)->getAttribute('data-src');
$imageSrc = $element->find('img.ima-center', 0)->getAttribute('src');
// Use large image instead of small one
$imageSrc = str_replace('/xs/', '/lg/', $imageSrc);
$image = self::URI . $imageSrc;
$author = $element->find('div.avatar-holder', 0)->plaintext;

File diff suppressed because it is too large Load Diff

View File

@@ -13,8 +13,7 @@ favicon-63b2904a073c89b52b19aa08cebc16a154bcf83fee8ecc6439968b1e6db569c7.ico';
}
public function collectData(){
$html = getSimpleHTMLDOM(self::URI)
or returnServerError('Error while downloading the website content');
$html = getSimpleHTMLDOM(self::URI);
$json = $this->loadEmbeddedJsonData($html);
@@ -86,7 +85,7 @@ favicon-63b2904a073c89b52b19aa08cebc16a154bcf83fee8ecc6439968b1e6db569c7.ico';
private function getImageTag($preview_path, $title){
return sprintf(
'<br /> <a href="%s"><img src="%s" alt="%s" /></a>',
'<br /> <a href="%s"><img srcset="%s" alt="%s" /></a>',
$this->getFullSizeImagePath($preview_path),
$preview_path,
$title
@@ -94,6 +93,11 @@ favicon-63b2904a073c89b52b19aa08cebc16a154bcf83fee8ecc6439968b1e6db569c7.ico';
}
private function getFullSizeImagePath($preview_path){
return explode("?compress=1", $preview_path)[0];
// Get last image from srcset
$src_set_urls = explode(',', $preview_path);
$url = end($src_set_urls);
$url = explode(' ', $url)[1];
return htmlspecialchars_decode($url);
}
}

205
bridges/Drive2ruBridge.php Normal file
View File

@@ -0,0 +1,205 @@
<?php
class Drive2ruBridge extends BridgeAbstract {
const MAINTAINER = 'dotter-ak';
const NAME = 'Drive2.ru';
const URI = 'https://drive2.ru/';
const DESCRIPTION = 'Лента новостей и тестдрайвов, бортжурналов по выбранной марке или модели
(также работает с фильтром по категориям), блогов пользователей и публикаций по темам.';
const PARAMETERS = array(
'Новости и тест-драйвы' => array(),
'Бортжурналы (По модели или марке)' => array(
'url' => array(
'name' => 'Ссылка на страницу с бортжурналом',
'type' => 'text',
'required' => true,
'title' => 'Например: https://www.drive2.ru/experience/suzuki/g4895/',
'exampleValue' => 'https://www.drive2.ru/experience/suzuki/g4895/'
),
),
'Личные блоги' => array(
'username' => array(
'name' => 'Никнейм пользователя на сайте',
'type' => 'text',
'required' => true,
'title' => 'Например: Mickey',
'exampleValue' => 'Mickey'
)
),
'Публикации по темам (Стоит почитать)' => array(
'topic' => array(
'name' => 'Темы',
'type' => 'list',
'values' => array(
'Автозвук' => '16',
'Автомобильный дизайн' => '10',
'Автоспорт' => '11',
'Автошоу, музеи, выставки' => '12',
'Безопасность' => '18',
'Беспилотные автомобили' => '15',
'Видеосюжеты' => '20',
'Вне дорог' => '21',
'Встречи' => '22',
'Выбор и покупка машины' => '23',
'Гаджеты' => '30',
'Гибридные машины' => '32',
'Грузовики, автобусы, спецтехника' => '31',
'Доработка интерьера' => '35',
'Законодательство' => '40',
'История автомобилестроения' => '50',
'Мототехника' => '60',
'Новые модели и концепты' => '85',
'Обучение вождению' => '70',
'Путешествия' => '80',
'Ремонт и обслуживание' => '90',
'Реставрация ретро-авто' => '91',
'Сделай сам' => '104',
'Смешное' => '103',
'Спорткары' => '102',
'Стайлинг' => '101',
'Тест-драйвы' => '110',
'Тюнинг' => '111',
'Фотосессии' => '120',
'Шины и диски' => '140',
'Электрика' => '130',
'Электромобили' => '131'
),
'defaultValue' => '16',
)
),
'global' => array(
'full_articles' => array(
'name' => 'Загружать в ленту полный текст',
'type' => 'checkbox'
)
)
);
private $title;
private function getUserContent($url) {
$html = getSimpleHTMLDOM($url);
$this->title = $html->find('title', 0)->innertext;
$articles = $html->find('div.js-entity');
foreach ($articles as $article) {
$item = array();
$item['title'] = $article->find('a.c-link--text', 0)->plaintext;
$item['uri'] = urljoin(self::URI, $article->find('a.c-link--text', 0)->href);
if($this->getInput('full_articles')) {
$item['content'] = $this->addCommentsLink(
$this->adjustContent(getSimpleHTMLDomCached($item['uri'])->find('div.c-post__body', 0))->innertext,
$item['uri']
);
} else {
$item['content'] = $this->addReadMoreLink($article->find('div.c-post-preview__lead', 0), $item['uri']);
}
$item['author'] = $article->find('a.c-username--wrap', 0)->plaintext;
if (!is_null($article->find('img', 1))) $item['enclosures'][] = $article->find('img', 1)->src;
$this->items[] = $item;
}
}
private function getLogbooksContent($url) {
$html = getSimpleHTMLDOM($url);
$this->title = $html->find('title', 0)->innertext;
$articles = $html->find('div.js-entity');
foreach ($articles as $article) {
$item = array();
$item['title'] = $article->find('a.c-link--text', 1)->plaintext;
$item['uri'] = urljoin(self::URI, $article->find('a.c-link--text', 1)->href);
if($this->getInput('full_articles')) {
$item['content'] = $this->addCommentsLink(
$this->adjustContent(getSimpleHTMLDomCached($item['uri'])->find('div.c-post__body', 0))->innertext,
$item['uri']
);
} else {
$item['content'] = $this->addReadMoreLink($article->find('div.c-post-preview__lead', 0), $item['uri']);
}
$item['author'] = $article->find('a.c-username--wrap', 0)->plaintext;
if (!is_null($article->find('img', 1))) $item['enclosures'][] = $article->find('img', 1)->src;
$this->items[] = $item;
}
}
private function getNews() {
$html = getSimpleHTMLDOM('https://www.drive2.ru/editorial/');
$this->title = $html->find('title', 0)->innertext;
$articles = $html->find('div.c-article-card');
foreach ($articles as $article) {
$item = array();
$item['title'] = $article->find('a.c-link--text', 0)->plaintext;
$item['uri'] = urljoin(self::URI, $article->find('a.c-link--text', 0)->href);
if($this->getInput('full_articles')) {
$item['content'] = $this->addCommentsLink(
$this->adjustContent(getSimpleHTMLDomCached($item['uri'])->find('div.article', 0))->innertext,
$item['uri']
);
} else {
$item['content'] = $this->addReadMoreLink($article->find('div.c-article-card__lead', 0), $item['uri']);
}
$item['author'] = 'Новости и тест-драйвы на Drive2.ru';
if (!is_null($article->find('img', 0))) $item['enclosures'][] = $article->find('img', 0)->src;
$this->items[] = $item;
}
}
private function adjustContent($content) {
foreach ($content->find('div.o-group') as $node)
$node->outertext = '';
foreach($content->find('div, span') as $attrs)
foreach ($attrs->getAllAttributes() as $attr => $val)
$attrs->removeAttribute($attr);
foreach ($content->getElementsByTagName('figcaption') as $attrs)
$attrs->setAttribute(
'style',
'font-style: italic; font-size: small; margin: 0 100px 75px;');
foreach ($content->find('script') as $node)
$node->outertext = '';
foreach ($content->find('iframe') as $node) {
preg_match('/embed\/(.*?)\?/', $node->src, $match);
$node->outertext = '<a href="https://www.youtube.com/watch?v=' . $match[1] .
'">https://www.youtube.com/watch?v=' . $match[1] . '</a>';
}
return $content;
}
private function addCommentsLink ($content, $url) {
return $content . '<br><a href="' . $url . '#comments">Перейти к комментариям</a>';
}
private function addReadMoreLink ($content, $url) {
if (!is_null($content))
return preg_replace('!\s+!', ' ', str_replace('Читать дальше', '', $content->plaintext)) .
'<br><a href="' . $url . '">Читать далее</a>';
else return '';
}
public function collectData() {
switch($this->queriedContext) {
default:
case 'Новости и тест-драйвы':
$this->getNews();
break;
case 'Бортжурналы (По модели или марке)':
if (!preg_match('/^https:\/\/www.drive2.ru\/experience/', $this->getInput('url')))
returnServerError('Invalid url');
$this->getLogbooksContent($this->getInput('url'));
break;
case 'Личные блоги':
if (!preg_match('/^[a-zA-Z0-9-]{3,16}$/', $this->getInput('username')))
returnServerError('Invalid username');
$this->getUserContent('https://www.drive2.ru/users/' . $this->getInput('username'));
break;
case 'Публикации по темам (Стоит почитать)':
$this->getUserContent('https://www.drive2.ru/topics/' . $this->getInput('topic'));
break;
}
}
public function getName() {
return $this->title ?: parent::getName();
}
public function getIcon() {
return 'https://www.drive2.ru/favicon.ico';
}
}

View File

@@ -13,6 +13,7 @@ class DuckDuckGoBridge extends BridgeAbstract {
const PARAMETERS = array( array(
'u' => array(
'name' => 'keyword',
'exampleValue' => 'duck',
'required' => true
),
'sort' => array(
@@ -28,14 +29,13 @@ class DuckDuckGoBridge extends BridgeAbstract {
));
public function collectData(){
$html = getSimpleHTMLDOM(self::URI . 'html/?kd=-1&q=' . $this->getInput('u') . $this->getInput('sort'))
or returnServerError('Could not request DuckDuckGo.');
$html = getSimpleHTMLDOM(self::URI . 'html/?kd=-1&q=' . $this->getInput('u') . $this->getInput('sort'));
foreach($html->find('div.results_links') as $element) {
foreach($html->find('div.result') as $element) {
$item = array();
$item['uri'] = $element->find('a', 0)->href;
$item['title'] = $element->find('a', 1)->innertext;
$item['content'] = $element->find('div.snippet', 0)->plaintext;
$item['uri'] = $element->find('a.result__a', 0)->href;
$item['title'] = $element->find('h2.result__title', 0)->plaintext;
$item['content'] = $element->find('a.result__snippet', 0)->plaintext;
$this->items[] = $item;
}
}

View File

@@ -1,161 +0,0 @@
<?php
class ETTVBridge extends BridgeAbstract {
const MAINTAINER = 'GregThib';
const NAME = 'ETTV';
const URI = 'https://www.ettv.tv/';
const DESCRIPTION = 'Returns list of 20 latest torrents for a specific search.';
const CACHE_TIMEOUT = 14400; // 4 hours
const PARAMETERS = array( array(
'query' => array(
'name' => 'Keywords',
'required' => true
),
'cat' => array(
'type' => 'list',
'name' => 'Category',
'values' => array(
'(ALL TYPES)' => '0',
'Anime: Movies' => '73',
'Anime: Dubbed/Subbed' => '74',
'Anime: Others' => '75',
'Books: Ebooks' => '53',
'Books: Magazines' => '54',
'Books: Comics' => '55',
'Books: Audio' => '56',
'Books: Others' => '68',
'Games: Windows' => '57',
'Games: Android' => '58',
'Games: Others' => '71',
'Movies: HD 1080p' => '1',
'Movies: HD 720p' => '2',
'Movies: UltraHD/4K' => '3',
'Movies: XviD' => '42',
'Movies: X264/H264' => '47',
'Movies: 3D' => '49',
'Movies: Dubs/Dual Audio' => '51',
'Movies: CAM/TS' => '65',
'Movies: BluRay Disc/Remux' => '66',
'Movies: DVDR' => '67',
'Movies: HEVC/x265' => '76',
'Music: MP3' => '59',
'Music: FLAC' => '60',
'Music: Music Videos' => '61',
'Music: Others' => '69',
'Software: Windows' => '62',
'Software: Android' => '63',
'Software: Mac' => '64',
'Software: Others' => '70',
'TV: HD/X264/H264' => '41',
'TV: SD/X264/H264' => '5',
'TV: TV Packs' => '7',
'TV: SD/XVID' => '50',
'TV: Sport' => '72',
'TV: HEVC/x265' => '77',
'Unsorted: Unsorted' => '78'
),
'defaultValue' => '(ALL TYPES)'
),
'status' => array(
'type' => 'list',
'name' => 'Status',
'values' => array(
'Active Transfers' => '0',
'Included Dead' => '1',
'Only Dead' => '2'
),
'defaultValue' => 'Included Dead'
),
'lang' => array(
'type' => 'list',
'name' => 'Lang',
'values' => array(
'(ALL)' => '0',
'Arabic' => '17',
'Chinese ' => '10',
'Danish' => '13',
'Dutch' => '11',
'English' => '1',
'Finnish' => '18',
'French' => '2',
'German' => '3',
'Greek' => '15',
'Hindi' => '8',
'Italian' => '4',
'Japanese' => '5',
'Korean' => '9',
'Polish' => '14',
'Russian' => '7',
'Spanish' => '6',
'Turkish' => '16'
),
'defaultValue' => '(ALL)'
)
));
protected $results_link;
public function collectData(){
// No control on inputs, because all defaultValue are set
$query_str = 'torrents-search.php';
$query_str .= '?search=' . urlencode('+' . str_replace(' ', ' +', $this->getInput('query')));
$query_str .= '&cat=' . $this->getInput('cat');
$query_str .= '&incldead=' . $this->getInput('status');
$query_str .= '&lang=' . $this->getInput('lang');
$query_str .= '&sort=id&order=desc';
// Get results page
$this->results_link = self::URI . $query_str;
$html = getSimpleHTMLDOM($this->results_link)
or returnServerError('Could not request ' . $this->getName());
// Loop on each entry
foreach($html->find('table.table tr') as $element) {
if($element->parent->tag == 'thead') continue;
$entry = $element->find('td', 1)->find('a', 0);
// retrieve result page to get more details
$link = rtrim(self::URI, '/') . $entry->href;
$page = getSimpleHTMLDOM($link)
or returnServerError('Could not request page ' . $link);
// get details & download links
$details = $page->find('fieldset.download table', 0); // WHAT?? It should be the second one…
$dllinks = $page->find('div#downloadbox table', 0);
// fill item
$item = array();
$item['author'] = $details->children(6)->children(1)->plaintext;
$item['title'] = $entry->title;
$item['uri'] = $link;
$item['timestamp'] = strtotime($details->children(7)->children(1)->plaintext);
$item['content'] = '';
$item['content'] .= '<br/><b>Name: </b>' . $details->children(0)->children(1)->innertext;
$item['content'] .= '<br/><b>Lang: </b>' . $details->children(3)->children(1)->innertext;
$item['content'] .= '<br/><b>Size: </b>' . $details->children(4)->children(1)->innertext;
$item['content'] .= '<br/><b>Hash: </b>' . $details->children(5)->children(1)->innertext;
foreach($dllinks->children(0)->children(1)->find('a') as $dl) {
$item['content'] .= '<br/>' . $dl->outertext;
}
$item['content'] .= '<br/><br/>' . $details->children(1)->children(0)->innertext;
$this->items[] = $item;
}
}
public function getName(){
if($this->getInput('query')) {
return '[' . self::NAME . '] ' . $this->getInput('query');
}
return self::NAME;
}
public function getURI(){
if(isset($this->results_link) && !empty($this->results_link)) {
return $this->results_link;
}
return self::URI;
}
}

View File

@@ -10,7 +10,8 @@ on EZTV. Get showID from URLs in https://eztv.ch/shows/showID/show-full-name.';
const PARAMETERS = array( array(
'i' => array(
'name' => 'Show ids',
'exampleValue' => 'showID1,showID2,…',
'exampleValue' => '1017,249',
'title' => 'One of more showids as a comma separated list',
'required' => true
)
));
@@ -35,8 +36,7 @@ on EZTV. Get showID from URLs in https://eztv.ch/shows/showID/show-full-name.';
foreach($showList as $showID) {
// Get show page
$html = getSimpleHTMLDOM(self::URI . 'shows/' . rawurlencode($showID) . '/')
or returnServerError('Could not request EZTV for id "' . $showID . '"');
$html = getSimpleHTMLDOM(self::URI . 'shows/' . rawurlencode($showID) . '/');
// Loop on each element that look like an episode entry...
foreach($html->find('.forum_header_border') as $element) {

View File

@@ -1,63 +1,143 @@
<?php
class EconomistBridge extends BridgeAbstract {
const NAME = 'The Economist: Latest Updates';
const URI = 'https://www.economist.com';
const DESCRIPTION = 'Fetches the latest updates from the Economist.';
const MAINTAINER = 'thefranke';
const CACHE_TIMEOUT = 3600; // 1h
class EconomistBridge extends FeedExpander {
public function getIcon() {
return 'https://www.economist.com/sites/default/files/econfinal_favicon.ico';
const MAINTAINER = 'bockiii';
const NAME = 'Economist Bridge';
const URI = 'https://www.economist.com/';
const CACHE_TIMEOUT = 3600; //1hour
const DESCRIPTION = 'Returns the latest articles for the selected category';
const PARAMETERS = array(
'global' => array(
'limit' => array(
'name' => 'Feed Item Limit',
'required' => true,
'type' => 'number',
'defaultValue' => 10,
'title' => 'Maximum number of returned feed items. Maximum 30, default 10'
)
),
'Topics' => array(
'topic' => array(
'name' => 'Topics',
'type' => 'list',
'title' => 'Select a Topic',
'defaultValue' => 'latest',
'values' => array(
'Latest' => 'latest',
'The world this week' => 'the-world-this-week',
'Letters' => 'letters',
'Leaders' => 'leaders',
'Briefings' => 'briefing',
'Special reports' => 'special-report',
'Britain' => 'britain',
'Europe' => 'europe',
'United States' => 'united-states',
'The Americas' => 'the-americas',
'Middle East and Africa' => 'middle-east-and-africa',
'Asia' => 'asia',
'China' => 'china',
'International' => 'international',
'Business' => 'business',
'Finance and economics' => 'finance-and-economics',
'Science and technology' => 'science-and-technology',
'Books and arts' => 'books-and-arts',
'Obituaries' => 'obituary',
'Graphic detail' => 'graphic-detail',
'Indicators' => 'economic-and-financial-indicators',
)
)
),
'Blogs' => array(
'blog' => array(
'name' => 'Blogs',
'type' => 'list',
'title' => 'Select a Blog',
'values' => array(
'Bagehots notebook' => 'bagehots-notebook',
'Bartleby' => 'bartleby',
'Buttonwoods notebook' => 'buttonwoods-notebook',
'Charlemagnes notebook' => 'charlemagnes-notebook',
'Democracy in America' => 'democracy-in-america',
'Erasmus' => 'erasmus',
'Free exchange' => 'free-exchange',
'Game theory' => 'game-theory',
'Gulliver' => 'gulliver',
'Kaffeeklatsch' => 'kaffeeklatsch',
'Prospero' => 'prospero',
'The Economist Explains' => 'the-economist-explains',
)
)
)
);
public function collectData(){
// get if topics or blogs were selected and store the selected category
switch ($this->queriedContext) {
case 'Topics':
$category = $this->getInput('topic');
break;
case 'Blogs':
$category = $this->getInput('blog');
break;
default:
$category = 'latest';
}
// limit the returned articles to 30 at max
if ((int)$this->getInput('limit') <= 30) {
$limit = (int)$this->getInput('limit');
} else {
$limit = 30;
}
$this->collectExpandableDatas('https://www.economist.com/' . $category . '/rss.xml', $limit);
}
public function collectData() {
$html = getSimpleHTMLDOM(self::URI . '/latest/')
or returnServerError('Could not fetch latest updates form The Economist.');
foreach($html->find('article') as $element) {
$a = $element->find('a', 0);
$href = self::URI . $a->href;
$full = getSimpleHTMLDOMCached($href);
$article = $full->find('article', 0);
$header = $article->find('h1', 0);
$author = $article->find('span[itemprop="author"]', 0);
$time = $article->find('time[itemprop="dateCreated"]', 0);
$content = $article->find('div[itemprop="description"]', 0);
// Remove newsletter subscription box
$newsletter = $content->find('div[class="newsletter-form__message"]', 0);
if ($newsletter)
$newsletter->outertext = '';
$newsletterForm = $content->find('form', 0);
if ($newsletterForm)
$newsletterForm->outertext = '';
// Remove next and previous article URLs at the bottom
$nextprev = $content->find('div[class="blog-post__next-previous-wrapper"]', 0);
if ($nextprev)
$nextprev->outertext = '';
$section = array( $article->find('h3[itemprop="articleSection"]', 0)->plaintext );
$item = array();
$item['title'] = $header->find('span', 0)->innertext . ': '
. $header->find('span', 1)->innertext;
$item['uri'] = $href;
$item['timestamp'] = strtotime($time->datetime);
$item['author'] = $author->innertext;
$item['categories'] = $section;
$item['content'] = '<img style="max-width: 100%" src="'
. $a->find('img', 0)->src . '">' . $content->innertext;
$this->items[] = $item;
if (count($this->items) >= 10)
break;
protected function parseItem($feedItem){
$item = parent::parseItem($feedItem);
$article = getSimpleHTMLDOM($item['uri']);
// before the article can be added, it needs to be cleaned up, thus, the extra function
// We also need to distinguish between old style and new style articles
if ($article->find('article', 0)->getAttribute('data-test-id') == 'Article') {
$contentNode = 'div.layout-article-body';
$imgNode = 'div.article__lead-image';
$categoryNode = 'span.article__subheadline';
} elseif ($article->find('article', 0)->getAttribute('data-test-id') === 'NewArticle') {
$contentNode = 'section';
$imgNode = 'figure.css-12eysrk.e3y6nua0';
$categoryNode = 'span.ern1uyf0';
} else {
return;
}
$item['content'] = $this->cleanContent($article, $contentNode);
// only the article lead image is retained if it's there
if (!is_null($article->find($imgNode, 0))) {
$item['enclosures'][] = $article->find($imgNode, 0)->find('img', 0)->getAttribute('src');
} else {
$item['enclosures'][] = '';
}
// add the subheadline as category. This will create a link in new articles
// and a text in old articles
$item['categories'][] = $article->find($categoryNode, 0)->innertext;
return $item;
}
private function cleanContent($article, $contentNode){
// the actual article is in this div
$content = $article->find($contentNode, 0)->innertext;
// clean the article content. Remove all div's since the text is in paragraph elements
foreach (array(
'<div '
) as $tag_start) {
$content = stripRecursiveHTMLSection($content, 'div', $tag_start);
}
// now remove embedded iframes. The podcast postings contain these for example
$content = preg_replace('/<iframe.*?\/iframe>/i', '', $content);
// fix the relative links
$content = defaultLinkTo($content, $this->getURI());
return $content;
}
}

View File

@@ -25,8 +25,7 @@ class EliteDangerousGalnetBridge extends BridgeAbstract {
$language = $this->getInput('language');
$url = 'https://community.elitedangerous.com/';
$url = $url . $language . '/galnet';
$html = getSimpleHTMLDOM($url)
or returnServerError('Error while downloading the website content');
$html = getSimpleHTMLDOM($url);
foreach($html->find('div.article') as $element) {
$item = array();

View File

@@ -12,6 +12,7 @@ class ElloBridge extends BridgeAbstract {
'u' => array(
'name' => 'Username',
'required' => true,
'exampleValue' => 'zteph',
'title' => 'Username'
)
),
@@ -19,6 +20,7 @@ class ElloBridge extends BridgeAbstract {
's' => array(
'name' => 'Search',
'required' => true,
'exampleValue' => 'bird',
'title' => 'Search'
)
)

View File

@@ -11,7 +11,7 @@ class ElsevierBridge extends BridgeAbstract {
'j' => array(
'name' => 'Journal name',
'required' => true,
'exampleValue' => 'academic-pediactrics',
'exampleValue' => 'academic-pediatrics',
'title' => 'Insert html-part of your journal'
)
));
@@ -63,8 +63,7 @@ class ElsevierBridge extends BridgeAbstract {
public function collectData(){
$uri = self::URI . $this->getInput('j') . '/recent-articles/';
$html = getSimpleHTMLDOM($uri)
or returnServerError('No results for Elsevier journal ' . $this->getInput('j'));
$html = getSimpleHTMLDOM($uri);
foreach($html->find('.pod-listing') as $article) {
$item = array();

View File

@@ -10,14 +10,8 @@ class EpicgamesBridge extends BridgeAbstract {
const PARAMETERS = array( array(
'postcount' => array(
'name' => 'Limit',
'type' => 'list',
'values' => array(
'5' => 5,
'10' => 10,
'15' => 15,
'20' => 20,
'25' => 25,
),
'type' => 'number',
'required' => true,
'title' => 'Maximum number of items to return',
'defaultValue' => 10,
),
@@ -57,10 +51,8 @@ class EpicgamesBridge extends BridgeAbstract {
// Example: https://store-content.ak.epicgames.com/api/ru/content/blog?limit=25
$urlBlog = $api . $this->getInput('language') . '/content/blog?limit=' . $this->getInput('postcount');
$dataSticky = getContents($urlSticky)
or returnServerError('Unable to get the sticky posts from epicgames.com!');
$dataBlog = getContents($urlBlog)
or returnServerError('Unable to get the news posts from epicgames.com!');
$dataSticky = getContents($urlSticky);
$dataBlog = getContents($urlBlog);
// Merge data
$decodedData = array_merge(json_decode($dataSticky), json_decode($dataBlog));

View File

@@ -42,8 +42,7 @@ class EsquerdaNetBridge extends FeedExpander {
$item = parent::parseItem($newsItem);
# Include all the content
$uri = $item['uri'];
$html = getSimpleHTMLDOMCached($uri)
or returnServerError('Could not load content for ' . $uri);
$html = getSimpleHTMLDOMCached($uri);
$content = $html->find('div#content div.content', 0);
## Fix author
$authorHTML = $html->find('.field-name-field-op-author a', 0);

View File

@@ -8,8 +8,7 @@ class EstCeQuonMetEnProdBridge extends BridgeAbstract {
const DESCRIPTION = 'Should we put a website in production today? (French)';
public function collectData() {
$html = getSimpleHTMLDOM(self::URI)
or returnServerError('Could not request EstCeQuonMetEnProd: ' . self::URI);
$html = getSimpleHTMLDOM(self::URI);
$item = array();
$item['uri'] = $this->getURI() . '#' . date('Y-m-d');

View File

@@ -12,7 +12,7 @@ class EtsyBridge extends BridgeAbstract {
'type' => 'text',
'required' => true,
'title' => 'Insert your search term here',
'exampleValue' => 'Enter your search term'
'exampleValue' => 'lamp'
),
'queryextension' => array(
'name' => 'Query extension',
@@ -33,8 +33,7 @@ class EtsyBridge extends BridgeAbstract {
);
public function collectData(){
$html = getSimpleHTMLDOM($this->getURI())
or returnServerError('Failed to receive ' . $this->getURI());
$html = getSimpleHTMLDOM($this->getURI());
$results = $html->find('li.block-grid-item');

View File

@@ -0,0 +1,38 @@
<?php
class ExecuteProgramBridge extends BridgeAbstract
{
const NAME = 'Execute Program Blog';
const URI = 'https://www.executeprogram.com/blog';
const DESCRIPTION = 'Unofficial feed for the www.executeprogram.com blog';
const MAINTAINER = 'dvikan';
public function collectData()
{
$data = json_decode(getContents('https://www.executeprogram.com/api/pages/blog'));
foreach ($data->posts as $post) {
$year = $post->date->year;
$month = $post->date->month;
$day = $post->date->day;
$item = array();
$item['uri'] = sprintf('https://www.executeprogram.com/blog/%s', $post->slug);
$item['title'] = $post->title;
$dateTime = \DateTime::createFromFormat('Y-m-d', $year . '-' . $month . '-' . $day);
$item['timestamp'] = $dateTime->format('U');
$item['content'] = $post->body;
$this->items[] = $item;
}
usort($this->items, function ($a, $b) {
return $a['timestamp'] < $b['timestamp'];
});
}
public function getIcon()
{
return 'https://www.executeprogram.com/favicon.ico';
}
}

59
bridges/ExplosmBridge.php Normal file
View File

@@ -0,0 +1,59 @@
<?php
class ExplosmBridge extends BridgeAbstract {
const MAINTAINER = 'bockiii';
const NAME = 'Explosm Bridge';
const URI = 'https://www.explosm.net/';
const CACHE_TIMEOUT = 4800; //2hours
const DESCRIPTION = 'Returns the last 5 comics';
const PARAMETERS = array(
'Get latest posts' => array(
'limit' => array(
'name' => 'Posts limit',
'type' => 'number',
'title' => 'Maximum number of items to return',
'defaultValue' => 5
)
)
);
public function collectData(){
$limit = $this->getInput('limit');
$latest = getSimpleHTMLDOM('https://explosm.net/comics/latest');
$image = $latest->find('div[id=comic]', 0)->find('img', 0)->getAttribute('src');
$date_string = $latest->find('p[class*=Author__P]', 0)->innertext;
$next_data_string = $latest->find('script[id=__NEXT_DATA__]', 0)->innertext;
$exp = '/{\\\"latest\\\":\[{\\\"slug\\\":\\\"(.*?)\\ /';
$reg_array = array();
preg_match($exp, $next_data_string, $reg_array);
$comic_id = $reg_array[1];
$comic_id = substr($comic_id, 0, strpos($comic_id, '\\'));
$item = array();
$item['uri'] = $this::URI . 'comics/' . $comic_id;
$item['uid'] = $this::URI . 'comics/' . $comic_id;
$item['title'] = 'Comic for ' . $date_string;
$item['timestamp'] = strtotime($date_string);
$item['author'] = $latest->find('p[class*=Author__P]', 2)->innertext;
$item['content'] = '<img src="' . $image . '" />';
$this->items[] = $item;
$next_comic = substr($this::URI, 0, -1)
. $latest->find('div[class*=MainComic__Selector]', 0)->find('a', 0)->getAttribute('href');
// use index 1 as the latest comic was already found
for ($i = 1; $i <= $limit; $i++) {
$this_comic = getSimpleHTMLDOM($next_comic);
$image = $this_comic->find('div[id=comic]', 0)->find('img', 0)->getAttribute('src');
$date_string = $this_comic->find('p[class*=Author__P]', 0)->innertext;
$item = array();
$item['uri'] = $next_comic;
$item['uid'] = $next_comic;
$item['title'] = 'Comic for ' . $date_string;
$item['timestamp'] = strtotime($date_string);
$item['author'] = $this_comic->find('p[class*=Author__P]', 2)->innertext;
$item['content'] = '<img src="' . $image . '" />';
$this->items[] = $item;
$next_comic = substr($this::URI, 0, -1)
. $this_comic->find('div[class*=MainComic__Selector]', 0)->find('a', 0)->getAttribute('href'); // get next comic link
}
}
}

View File

@@ -1,7 +1,7 @@
<?php
class ExtremeDownloadBridge extends BridgeAbstract {
const NAME = 'Extreme Download';
const URI = 'https://www.extreme-down.ninja/';
const URI = 'https://www.extreme-down.plus/';
const DESCRIPTION = 'Suivi de série sur Extreme Download';
const MAINTAINER = 'sysadminstory';
const PARAMETERS = array(
@@ -10,7 +10,7 @@ class ExtremeDownloadBridge extends BridgeAbstract {
'name' => 'URL de la série',
'type' => 'text',
'required' => true,
'title' => 'URL d\'une série sans le https://ww1.extreme-d0wn.com/',
'title' => 'URL d\'une série sans le https://www.extreme-down.plus/',
'exampleValue' => 'series-hd/hd-series-vostfr/46631-halt-and-catch-fire-saison-04-vostfr-hdtv-720p.html'),
'filter' => array(
'name' => 'Type de contenu',
@@ -26,8 +26,7 @@ class ExtremeDownloadBridge extends BridgeAbstract {
);
public function collectData(){
$html = getSimpleHTMLDOM(self::URI . $this->getInput('url'))
or returnServerError('Could not request Extreme Download.');
$html = getSimpleHTMLDOM(self::URI . $this->getInput('url'));
$filter = $this->getInput('filter');
@@ -81,6 +80,16 @@ class ExtremeDownloadBridge extends BridgeAbstract {
}
}
public function getURI() {
switch($this->queriedContext) {
case 'Suivre la publication des épisodes d\'une série en cours de diffusion':
return self::URI . $this->getInput('url');
break;
default:
return self::URI;
}
}
private function findLinkType($element)
{
$return = '';

View File

@@ -4,7 +4,7 @@ class FDroidBridge extends BridgeAbstract {
const MAINTAINER = 'Mitsukarenai';
const NAME = 'F-Droid Bridge';
const URI = 'https://f-droid.org/';
const CACHE_TIMEOUT = 60 * 60 * 2; // 2 hours
const CACHE_TIMEOUT = 60 * 60 * 4; // 4 hours
const DESCRIPTION = 'Returns latest added/updated apps on the open-source Android apps repository F-Droid';
const PARAMETERS = array( array(
@@ -22,10 +22,35 @@ class FDroidBridge extends BridgeAbstract {
return self::URI . 'assets/favicon.ico?v=8j6PKzW9Mk';
}
private function getTimestamp($url) {
$curlOptions = array(
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HEADER => true,
CURLOPT_NOBODY => true,
CURLOPT_CONNECTTIMEOUT => 19,
CURLOPT_TIMEOUT => 19,
);
$ch = curl_init($url);
curl_setopt_array($ch, $curlOptions);
$curlHeaders = curl_exec($ch);
$curlError = curl_error($ch);
curl_close($ch);
if(!empty($curlError))
return false;
$curlHeaders = explode("\n", $curlHeaders);
$timestamp = false;
foreach($curlHeaders as $header) {
if(strpos($header, 'Last-Modified') !== false) {
$timestamp = str_replace('Last-Modified: ', '', $header);
$timestamp = strtotime($timestamp);
}
}
return $timestamp;
}
public function collectData(){
$url = self::URI;
$html = getSimpleHTMLDOM($url)
or returnServerError('Could not request F-Droid.');
$html = getSimpleHTMLDOM($url);
// targetting the corresponding widget based on user selection
// "updated" is the 5th widget on the page, "added" is the 6th
@@ -46,6 +71,7 @@ class FDroidBridge extends BridgeAbstract {
$item['uri'] = self::URI . $element->href;
$item['title'] = $element->find('h4', 0)->plaintext;
$item['icon'] = $element->find('img', 0)->src;
$item['timestamp'] = $this->getTimestamp($item['icon']);
$item['summary'] = $element->find('span.package-summary', 0)->plaintext;
$item['content'] = '
<a href="' . $item['uri'] . '">

Some files were not shown because too many files have changed in this diff Show More