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

maintenance: add __all__ to init.py and lint code #116

Merged
merged 1 commit into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions courlan/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,25 @@
get_hostinfo,
is_external,
)

__all__ = [
"clean_url",
"normalize_url",
"scrub_url",
"check_url",
"extract_links",
"is_navigation_page",
"is_not_crawlable",
"is_valid_url",
"lang_filter",
"validate_url",
"sample_urls",
"UrlStore",
"extract_domain",
"filter_urls",
"fix_relative_urls",
"get_base_url",
"get_host_and_path",
"get_hostinfo",
"is_external",
]
2 changes: 1 addition & 1 deletion courlan/urlutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def extract_domain(

return (
full_domain
if full_domain and not domain in blacklist and not full_domain in blacklist
if full_domain and domain not in blacklist and full_domain not in blacklist
else None
)

Expand Down
Loading