lib/command.py: Added searching function for links