collective / collective/sc.embedder

Get the list of providers on an alternative way and improved regexes for getting the url

Open
#66 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
3
Forks
7
PR merge metrics
No merged PRs in 30d

Description

See https://github.com/simplesconsultoria/sc.embedder/blob/262d279b25878d11706eb25c9b94a699789ed4e5/src/sc/embedder/utility.py#L7

The way it's implemented right now for example gives the following error for https links in some providers:

```
2020-01-13 16:44:19 INFO sc.embedder There are no endpoints available for https://vimeo.com/384531827
```

Don't know if it's possible, but I would suggest taking https://github.com/itteco/iframely/blob/master/lib/plugins/system/oembed/providers.json inside the package and creating a dictionary that has these validations at runtime: upgrading the providers would mean just downlading a new json and adding it to the package. Using this approach we fix the regex problem as well since they are improved.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with src/sc/embedder/utility.py around the provider-list and URL-validation logic, then inspect iframely's providers.json. Check how the current logic handles the Vimeo HTTPS example and determine how the packaged provider data would be loaded at runtime. Done means the provider list can be updated through the JSON file and HTTPS provider URLs are recognized correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.