1
0
mirror of https://github.com/instaloader/instaloader.git synced 2024-09-11 16:22:24 +02:00

Regex target matching: Fix hashtag regex

Unicode characters are allowed in hashtags, so instead of just
[A-Za-z0-9], we now match all \w.  Fixes #614.
This commit is contained in:
Alexander Graf 2020-05-14 16:17:07 +02:00
parent 83f013f6ca
commit 9857c5fa24

View File

@ -143,7 +143,7 @@ def _main(instaloader: Instaloader, targetlist: List[str],
for followee in profile.get_followees():
instaloader.save_profile_id(followee)
profiles.add(followee)
elif re.match(r"^#[A-Za-z0-9]+$", target):
elif re.match(r"^#\w+$", target):
instaloader.download_hashtag(hashtag=target[1:], max_count=max_count, fast_update=fast_update,
post_filter=post_filter,
profile_pic=download_profile_pic, posts=download_posts)