- Home
- Course Detail
regularpython@gmail.com
You are now watching:
Python Sets / of Python Set Real Time Example
import requests from bs4 import BeautifulSoup resp = requests.get("https://timesofindia.indiatimes.com/entertainment/telugu/movie-reviews") # print(resp.text) jsoup = BeautifulSoup(resp.text,"html.parser") list = jsoup.findAll("a") urlList = [] for l in list: try: urlList.append(l["href"]) except: pass urlList = set(urlList) for l in urlList: print(l)