Skip to content

Commit

Permalink
improved url source detection heuristic
Browse files Browse the repository at this point in the history
  • Loading branch information
emcf committed Apr 16, 2024
1 parent 754143a commit 11099c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion thepipe_api/extractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def extract_from_file(file_path: str, source_type: str, verbose: bool = False, a
def detect_type(source: str) -> Optional[SourceTypes]:
if source.startswith("https://github.com"):
return SourceTypes.GITHUB
elif source.startswith("http") or source.startswith("www.") or source.startswith("ftp."):
elif source.startswith("http") or source.startswith("ftp."):
return SourceTypes.URL
elif source.endswith(".zip"):
return SourceTypes.ZIP
Expand Down

0 comments on commit 11099c0

Please sign in to comment.