input: from typing import List
  
  def collect_links(url: str) -> List[str]:
      """Scrape a webpage and collect all the links from the website.
      >>> collect_links("http://www.example.com/")
      ['http://www.iana.org/domains/example']
      """
      import requests as req
      from bs4 import BeautifulSoup
      
      # GET request
      r = req.get(url)
      
      # parse the downloaded homepage and grab all text
      soup = BeautifulSoup(r.text, "html.parser")
      
      # find and return all links
      links = [link.get('href') for link in soup.find_all('a')]
      return links
output:     # Filter out None values and ensure all links are absolute URLs
      from urllib.parse import urljoin
      base_url = r.url
      links = [urljoin(base_url, link) for link in links if link]
      return links