Skip to content

Commit

Permalink
[deviantart] case-insensitive folder name matching (fixes #343)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikf committed Jul 19, 2019
1 parent a3c736f commit 5d96841
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions gallery_dl/extractor/deviantart.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,7 @@ def _commit_journal_text(deviation, journal):

@staticmethod
def _find_folder(folders, name):
pattern = re.compile(
r"[^\w]*" + name.replace("-", r"[^\w]+") + r"[^\w]*$")
pattern = re.compile(r"(?i)\W*" + name.replace("-", r"\W+") + r"\W*$")
for folder in folders:
if pattern.match(folder["name"]):
return folder
Expand Down

0 comments on commit 5d96841

Please sign in to comment.