2018 python獲取動態User-Agent

from fake_useragent import UserAgent ua = UserAgent() headers = {'User-Agent': ua.random} print(ua.random) 是的 你沒看錯,就這兩行代碼就能夠搞定了,可是這個是一個第三方庫,咱們須要用pip install fake_useragent  安裝之後 直接就能夠使用了 python 咱們看下輸
相關文章
相關標籤/搜索