mirror of
https://github.com/AAndyProgram/SCrawler.git
synced 2026-03-15 00:02:17 +00:00
3.0.0.2
24
Plugins.md
24
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<IPluginUserMedia> GetSpecialData(string URL);
|
||||
IEnumerable<PluginUserMedia> GetSpecialData(string URL);
|
||||
IPluginContentProvider GetInstance(Download What);
|
||||
void Load(IEnumerable<KeyValuePair<string, string>> XMLValues);
|
||||
IEnumerable<KeyValuePair<string, string>> 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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user