unify methods for parsing links