def is_remote(media):
    """Detect if media specified is a url"""
    if re.match(r"^https?://", media):
        return True
    return False
Detect if media specified is a url
instagrapi/image_util.py