-
-
Notifications
You must be signed in to change notification settings - Fork 5
Web
The WebExtension class provides extension methods for web-related operations such as retrieving the source code, calculating the code-to-text ratio, and getting the web header information of a URL.
The WebExtension class contains the following properties:
-
ECWT.CompressWebType
: an enum that specifies the type of web compression to use -
EHWT.HttpWebType
: an enum that specifies the type of HTTP web request to use -
MI.Internal
: a class that provides internal management methods -
MWWM.WebManage
: a class that provides web management methods
public static string Source(string Url = MWWM.Url)
This method retrieves the source code of the web page at the specified URL.
-
Url
: (optional) the URL of the web page to retrieve (default:MWWM.Url
)
A string containing the source code of the web page.
If an error occurs while retrieving the web page, a Skylark.Exception
is thrown.
public static Task<string> SourceAsync(string Url = MWWM.Url)
This method retrieves the source code of the web page at the specified URL asynchronously.
-
Url
: (optional) the URL of the web page to retrieve (default:MWWM.Url
)
A Task<string>
that represents the asynchronous operation. The result of the task is a string containing the source code of the web page.
If an error occurs while retrieving the web page, a Skylark.Exception
is thrown.
public static SWWRS Ratio(string Url = MWWM.Url, bool Separator = MWWM.Separator)
This method calculates the code-to-text ratio of the web page at the specified URL.
-
Url
: (optional) the URL of the web page to calculate the ratio for (default:MWWM.Url
) -
Separator
: (optional) a boolean value that specifies whether to use a separator for the returned values (default:MWWM.Separator
)
A SWWRS
struct that contains the following properties:
-
Rate
: a string representing the code-to-text ratio of the web page -
Total
: a string representing the total length of the web page in bytes -
Text
:
- Tax
- Url
- Web
- Ping
- Port
- Text
- Time
- Hash
- Word
- Color
- Speed
- Lottery
- Storage
- Browser
- Unicode
- Password
- JavaScript
- Cryptology
- Typography
- Temperature
- Compression
- Decompression
- Cascading Style Sheets
- JavaScript Object Notation
- Hypertext Markup Language
- Extensible Markup Language
- Extensible HyperText Markup Language