from fake_useragent import UserAgent ua = UserAgent().random headers={ 'User-Agent':ua } print(headers)