fix related_posts.py for Mac