This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
importrequests
frombs4importBeautifulSoup
importcsv
'''爬取豆瓣电影top20'''
deftop250_crawer(url,sum):
headers={
'User-agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/1'