parse_url ()
絶対 URL string を解析し、URL 部分を含む dynamic オブジェクトを返します。
構文
parse_url(URL)
引数
- url: ストリングは、URL または URL の照会部分を表します。
返品
URL コンポーネント (スキーム、ホスト、ポート、パス、ユーザー名、パスワード、照会パラメーター、フラグメント) を含む、 動的 タイプのオブジェクト。
例
print Result = parse_url("scheme://username:password@host:1234/this/is/a/path?k1=v1&k2=v2#fragment")
結果
{
"Scheme":"scheme",
"Host":"host",
"Port":"1234",
"Path":"this/is/a/path",
"Username":"username",
"Password":"password",
"Query Parameters":"{"k1":"v1", "k2":"v2"}",
"Fragment":"fragment"
}