diff --git a/Plugins.md b/Plugins.md index 1c84ead..941ca0c 100644 --- a/Plugins.md +++ b/Plugins.md @@ -8,6 +8,12 @@ The class that contains all the available objects is the Instagram settings: You can look at them as an example. +You can also use the following plugins as an example: +- [XVIDEOS](https://github.com/AAndyProgram/SCrawler/tree/main/SCrawler.Plugin.XVIDEOS) - development time 6.5 hours +- [LPSG](https://github.com/AAndyProgram/SCrawler/tree/main/SCrawler.Plugin.LPSG) - development time 1.5 hours + +**See how easy it is to create a plugin and make it for your site.** + The ```SCrawler.PluginProvider.dll``` is fully compatible with the most popular language - CSharp. Net.Framework version is 4.6.1. @@ -122,7 +128,7 @@ interface ISiteSettings string GetUserUrl(string UserName,bool Channel); ExchangeOptions IsMyUser(string UserURL); ExchangeOptions IsMyImageVideo(string URL); - IEnumerable GetSpecialData(string URL); + IEnumerable GetSpecialData(string URL); IPluginContentProvider GetInstance(Download What); void Load(IEnumerable> XMLValues); IEnumerable> XMLFields(); @@ -153,6 +159,10 @@ Site icon for forms and other objects (can be null). Site image for controls (such as buttons) and other objects. +### Logger + +This is the SCrawler log provider. It is set automatically by SCrawler on initialization. + ### GetUserUrl ```Function GetUserUrl(ByVal UserName As String, ByVal Channel As Boolean) As String``` @@ -184,11 +194,19 @@ Must return the same as the [```IsMyUser```](#ismyuser), but ```UserName``` can ### GetSpecialData -```Function GetSpecialData(ByVal URL As String) As IEnumerable(Of IPluginUserMedia)``` +```Function GetSpecialData(ByVal URL As String) As IEnumerable(Of PluginUserMedia)``` After ```IsMyImageVideo```, if this is your plugin's media file, this function will be called. -This function must return an IEnumerable ```IPluginUserMedia``` object. This object must contain the data URL and the file name (with extension). Any other fields are optional. +This function must return an IEnumerable ```PluginUserMedia``` object. This object must contain the data URL and the file name (with extension). Any other fields are optional. + +- ```URL``` - media URL +- ```Path``` - last destination path +- ```AskForPath``` - if ```true```, you need to ask the user to select a path + +**Only if the data is downloaded by your class:** +- If the returned data does not exists and ```AskForPath``` = ```true```, you need to return a ```PluginUserMedia``` object with ```SpecialPath``` = selected path. +- If the returned data exists, you need to replace ```PluginUserMedia.SpecialPath``` with the selected path. ### GetInstance