Plugins allow you to modify instamancer's functionality and behavior while gathering data.
The following internal plugins are included with instamancer (but not enabled by default):
| Plugin | Description |
|---|---|
| LargeFirst | Increase the first parameter in API requests to ask for more data |
Example:
instamancer hashtag puppies -c1000 --plugin LargeFirst --plugin MyPlugin
To install external plugins, you need to clone and install instamancer from source
Steps:
Clone the instamancer repository
Install instamancer's dependencies
Install the plugin with npm / yarn
Add the plugin to
plugins/plugins/index.tsExample:
export{MyPlugin}from"myplugin";Install instamancer
- You can skip this step if you want to run the CLI from source
Run the CLI with the plugin:
Example:
instamancer hashtag puppies -c100 --plugin MyPlugin
Add the plugin to the options :
import*asinstamancerfrom".";constoptions: instamancer.IOptions={plugins: [newinstamancer.plugins.LargeFirst()],silent: true,total: 100,};consthashtag=instamancer.createApi("hashtag","puppies",options);(async()=>{forawait(constpostofhashtag.generator()){console.log(post);}})();