Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Ability to add custom connectors? #506

Open
OPVL opened this issue Jan 18, 2025 · 0 comments
Open

[Feature Request] Ability to add custom connectors? #506

OPVL opened this issue Jan 18, 2025 · 0 comments

Comments

@OPVL
Copy link

OPVL commented Jan 18, 2025

Hi,

Absolutely loving your work, it works great!

I was just wondering if there was any scope for loading third party plugins, perhaps by providing a new scraper class for alternate cases, i.e url matches a pattern defined in the plugin.

In my mind it would be something like this:
Plugin exports pattern(s)
ServiceProvider loads plugins and stores a list of matching patterns
When submitting new url:

if plugins.length >= 1:
    for plugin in plugins:
        for pattern in plugin.patterns:
            if pattern.match(url):
                return plugin.scrape(url)

excuse my pythonic pseudo-code

basically I use a lot of recipes from bosh.tv but they don't provide their recipes in JSON metadata so to get around this I'm currently running a python instance locally that scrapes the page and returns the desired page with JSON metadata embedded. The current flow looks like this:

  1. Open recipe buddy
  2. Add recipe, paste the link in to the field appended to my python url eg. http://localhost:2080?url=https://www.bosh.tv/recipes/black-olive-pesto-pasta
  3. Use recipe buddy as normal to import the recipe

This currently works fine but it got me wondering if we could extend recipe buddy to support custom connectors. My typescript is not amazing but I'd be happy to help implement it. There may be a much better way to implement this, for now I'm doing away with the serviceprovider and i'm just going to fork and hard code in the pattern I'm expecting but plugins would be v cool.

No pressure to implement this at all, I may have a stab at it myself or you can close this and tell me to bugger off!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant