Wasn't using substr correctly, fixed that. Parser now gets multiple links on one line