使用faker去构造一个User-Agent faker可以仿造各种各样的信息,可以使用faker去构造一个User-Agent from faker import Factory f = Factory.create() 'User-Agent': f.user_agent()