Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

favicon_loader.py issue about websites with port #919

Open
mhlai222 opened this issue Nov 30, 2024 · 0 comments
Open

favicon_loader.py issue about websites with port #919

mhlai222 opened this issue Nov 30, 2024 · 0 comments

Comments

@mhlai222
Copy link

In the _get_url_parameters function of bookmarks/services/favicon_loader.py file, it doesn't consider the web sites with specific port.
For example, website1:8100 might have favicon1.ico and website1:8200 have favicon2.ico.
def _get_url_parameters(url: str) -> dict: parsed_uri = urlparse(url) return { # https://example.com/foo?bar -> https://example.com "url": f"{parsed_uri.scheme}://{parsed_uri.hostname}",

Suggest to change the code as below.
def _get_url_parameters(url: str) -> dict: parsed_uri = urlparse(url) port = ':'+parsed_uri.port if parsed_uri.port else '' return { # https://example.com/foo?bar -> https://example.com "url": f"{parsed_uri.scheme}://{parsed_uri.hostname}{port}",

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant