Better to use `urljoin` from `urlparse` for this, it avoid issues like double slashes:
`urljoin("https://api.dailymotion.com/", ref)`