pythonpython-3.xlistnltkurl-shortener

How can I read shortened urls with python?


How can I read shortened urls with python?

I have a list of shortened urls and i would like to get the real url or read the content of the page at least

{'urlshortened': 3, 'urlshortened': 3, 'urlshortened': 3,}


Solution

  • you can use the requests library and then use bs4 to get the page content, you should learn more about web scraping