JBrowser Source Docs
You are reading the documentation for JBrowser 1.4.1. The newest release is 1.5.4. Go to the latest documentation

jbrowser.core.urls

Generated from the source code of JBrowser 1.4.1.

jbrowser/core/urls.py · 159 lines

URL heuristics: omnibox input classification, host/domain helpers.

Constants#

Name Value
INTERNAL_SCHEMES {'http', 'https', 'file', 'about', 'data', 'view-source', 'chrome', 'qrc', 'ftp', 'blob…
EXTERNAL_SCHEMES {'mailto', 'tel', 'sms', 'callto', 'magnet', 'steam', 'spotify', 'zoommtg', 'msteams', …

Functions#

is_ip#

is_ip(host: str) -> boolsource

is_local_host#

is_local_host(host: str) -> boolsource

registrable_domain#

registrable_domain(host: str) -> strsource

Approximate eTLD+1 (e.g. a.b.example.co.uk -> example.co.uk).

same_site#

same_site(host_a: str, host_b: str) -> boolsource

strip_www#

strip_www(host: str) -> strsource

origin_of#

origin_of(url: QUrl) -> strsource

pretty_url#

pretty_url(url: str | QUrl, keep_path: bool=True) -> strsource

looks_like_url#

looks_like_url(text: str, dev_hosts: set[str] | None=None) -> boolsource

to_url#

to_url(text: str) -> QUrlsource

Turn user input that looks_like_url into a navigable QUrl.

display_title#

display_title(title: str, url: str) -> strsource