Add some more media sites#96
Conversation
Signed-off-by: Matt Friedman <maf675@gmail.com>
Signed-off-by: Matt Friedman <maf675@gmail.com>
Signed-off-by: Matt Friedman <maf675@gmail.com>
Signed-off-by: Matt Friedman <maf675@gmail.com>
collection/sites/mastodon.yml
Outdated
| oembed: | ||
| endpoint: https://mastodon.social/api/oembed | ||
| scheme: https://mastodon.social/@{@name}/{@id} | ||
| scrape: | ||
| - extract: | ||
| url: "!https://(?'host'[-.\\w]+)/@(?'name'\\w+)/(?'id'\\d+)!" |
There was a problem hiding this comment.
@JoshyPHP could you please judge if this part of definition is fully correct, especially the imported part of extract which looks like 'extract'=>['#"url":"https://(?\'host\'[-.\\w]+)/@(?\'name\'\\w+)/(?\'id\'\\d+)"#'] in CachedDefinitionCollection.php.
There was a problem hiding this comment.
At first glance it looked fine but on a second read I realized it was a trick of the eye caused by the YML structure. The regexp I use is #"url":"https://(?'host'[-.\w]+)/@(?'name'\w+)/(?'id'\d+)"#. That code looks like it creates a url attribute inside the extract definition.
I should mention that CachedDefinitionCollection.php is auto-generated from XML files. The XML files are canonical and human-readable.
There was a problem hiding this comment.
So... Like the way I just updated it is how it should be?
There was a problem hiding this comment.
That looks like it. If there's anything wrong with it, I can't see it.
Signed-off-by: Matt Friedman <maf675@gmail.com>
|
Well, regional issue would be the case for Bilibili but example link loads fine directly in the browser. Also the site works on my side in common. Weird. |
|
Yeah I don't know. I've tried in all 4 browsers and they work here (Edge, Firefox, Chrome and Safari) |



No description provided.