Skip to content

Commit

Permalink
fix regex
Browse files Browse the repository at this point in the history
  • Loading branch information
agahkarakuzu committed Nov 20, 2024
1 parent 3623201 commit 53509bb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions repo2data/repo2data.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,12 +323,12 @@ def _scan_dl_type(self):
# (osf, google, datalad, git), then fall back to requests to download the file.
if ((re.match(".*?(https://).*?", self._data_requirement_file["src"])
or re.match(".*?(http://).*?", self._data_requirement_file["src"]))
and not re.match(".*?(\\.git)", self._data_requirement_file["src"])
and not re.match(".*?\\.git$", self._data_requirement_file["src"])
and not re.match(".*?(drive\\.google\\.com).*?", self._data_requirement_file["src"])
and not re.match(".*?(https://osf\\.io).*?", self._data_requirement_file["src"])):
self._url_download()
# if the source link has a .git, we use datalad
elif re.match(".*?(\\.git)", self._data_requirement_file["src"]):
elif re.match(".*?\\.git$", self._data_requirement_file["src"]):
self._datalad_download()
# or coming from google drive
elif re.match(".*?(drive\\.google\\.com).*?", self._data_requirement_file["src"]):
Expand Down

0 comments on commit 53509bb

Please sign in to comment.