auto defaultUserAgent
Default user agent for network requests.
UniString getText(string url, long timeoutMilliseconds = -1, string userAgent = defaultUserAgent)
Get text content as amalthea.encoding.UniString by URL.
Parameters
| url | Resource address. |
| timeoutMilliseconds | Request execution timeout in milliseconds. If -1, timeout is not used. |
| userAgent | User agent. |
Returns
text response.
auto getElementsByTag(string html, string tag)
This function searches all elements from HTML page with a specific tag.
auto getElementsByTagAndAttribute(
string html,
string tag,
string attrName = "",
string attrValue = ""
)
This function searches all elements by a specific tag and an attribute.
Returns
Page element info (tag name and possible attributes) and content of the element as tuple with two elements.
ref string replaceSpecialMnemonics(return ref string htmlText)
Search and replace special characters in HTML for normal view.
Some useful functions based on std.net.curl.