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

Any hints or beginner guide about how to get more information? #363

Open
JohnRock0422 opened this issue Mar 28, 2022 · 1 comment
Open

Comments

@JohnRock0422
Copy link

Refer to this issue.
Missing meta description, site, author and date
#362

Where can I find beginner's guide for develop a plugin about extract description from wikipedia?

@iparamonau
Copy link
Member

iparamonau commented Mar 28, 2022

There's a very old general overview of how to write a plugin. It's obsolete in some places, for example there's now cheerio input variable instead of $selector. But it does provide a general idea. It is best to take a look at /plugins folder to see the other plugins as an example.

Basically, for your purpose, you'd need to create a domain plugin in /domains folder and with re node that contains a regex to URLs you'd want to support. Add method getMeta as node of your plugin. The method should return an object with properties description, site, author and date. As in return {description: ..., site: ..., author: ..., date: ...}.

Keep your custom plugins in the folder that you specify as CUSTOM_PLUGINS_PATH in your local config files. See here. And also keep /domains subfolder in that plugins directory.

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

2 participants