Skip to main content
noshairwan_khan's profile

Thu, Nov 14, 2019 11:05 AM

Web scrape specific data from imdb project

So i want to extract the movie scores from imdb with the score of 8.7 above.

i have done it up to here like this but i dont know what to do next https://bradfordremovalservice.com/

<!--td {border: 1px solid #ccc;}br {mso-data-placement:same-cell;}-->
import re<br alt="" title="" name="" value="" type="" target="" rel="">import requests<br alt="" title="" name="" value="" type="" target="" rel="">from bs4 import BeautifulSoup
l = list()
r = requests.get('https://www.imdb.com/chart/top?ref_=nv_mv_250')
soup = BeautifulSoup(r.text,'html.parser')
res = soup.find_all('strong')
for x in res:
    q = re.sub(r'\s+',' ',x.text)
    print(q)
it gives me all the scores. i just want 8.7 and above. and thanks for answering!

Responses