1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-01-17 22:28:22 +01:00
Roliga 49da67cb33 core: Automatically select a bridge based on a URL (#928)
* core: Add bridge parameter auto detection

This adds a new 'detect' action which accepts a URL from which an
appropriate bridge is selected and relevant parameters are extracted.
The user is then automatically redirected to the selected bridge.

For example to get a feed from: https://twitter.com/search?q=%23rss-bridge
we could send a request to:
'/?action=detect&format=Atom&url=twitter.com/search%3Fq%3D%2523rss-bridge'
which would redirect to:
'/?action=display&q=%23rss-bridge&bridge=Twitter&format=Atom'.

This auto detection happens on a per-bridge basis, so a new function
'detectParameters' is added to BridgeInterface which bridges may implement.
It takes a URL for an argument and returns a list of parameters that were
extracted, or null if the URL isn't relevant for the bridge.

* [TwitterBridge] Add parameter auto detection

* [BridgeAbstract] Add generic parameter detection

This adds generic "paramater detection" for bridges that don't have any
parameters defined. If the queried URL matches the URI defined in the
bridge (ignoring https://, www. and trailing /) an emtpy list of parameters is
returned.
2018-11-26 18:05:40 +01:00
..
2018-11-05 12:55:58 +01:00
2018-11-05 12:55:58 +01:00
2018-11-05 12:55:58 +01:00
2018-11-05 12:55:58 +01:00
2018-11-05 12:55:58 +01:00
2017-07-29 19:55:12 +02:00
2017-07-29 19:55:12 +02:00
2018-11-05 12:55:58 +01:00
2017-07-29 19:55:12 +02:00
2018-08-09 21:55:43 +02:00
2018-11-05 12:55:58 +01:00
2018-09-22 18:57:07 +02:00
2018-11-05 12:55:58 +01:00
2017-02-12 15:34:08 +01:00
2017-07-29 19:55:12 +02:00
2018-11-05 12:55:58 +01:00
2018-11-05 12:55:58 +01:00
2018-11-05 12:55:58 +01:00
2018-11-05 12:55:58 +01:00
2018-11-05 12:55:58 +01:00
2017-07-29 19:55:12 +02:00
2017-07-29 19:55:12 +02:00
2018-11-05 12:55:58 +01:00
2017-07-29 19:55:12 +02:00
2017-02-12 15:34:08 +01:00
2017-02-12 15:34:08 +01:00
2018-09-12 13:31:11 +01:00
2017-02-12 15:34:08 +01:00
2017-02-12 15:34:08 +01:00
2018-11-05 12:55:58 +01:00
2017-02-12 15:34:08 +01:00
2018-01-11 11:44:51 +00:00
2017-07-29 19:55:12 +02:00
2017-07-29 19:55:12 +02:00
2017-07-29 19:55:12 +02:00
2017-07-29 19:55:12 +02:00
2017-02-12 15:34:08 +01:00
2017-02-12 15:34:08 +01:00
2018-11-05 12:55:58 +01:00
2018-11-05 12:55:58 +01:00
2018-11-05 12:55:58 +01:00
2018-11-05 12:55:58 +01:00
2018-11-07 23:16:28 +01:00
2017-02-12 15:34:08 +01:00
2017-02-12 15:34:08 +01:00
2017-07-29 19:55:12 +02:00
2017-07-29 19:55:12 +02:00
2018-03-12 09:22:34 +00:00
2018-11-05 12:55:58 +01:00
2017-02-12 15:34:08 +01:00
2018-11-05 12:55:58 +01:00
2018-11-05 12:55:58 +01:00
2018-11-05 12:55:58 +01:00
2018-11-05 12:55:58 +01:00
2017-07-29 19:55:12 +02:00
2017-07-29 19:55:12 +02:00
2017-07-29 19:55:12 +02:00
2017-02-12 15:34:08 +01:00
2017-02-12 15:34:08 +01:00