import random

def load_config(path):
with open(path,'r') as tou:
return [line for line in tou.readlines()] headers = {
'User-Agent':load_config('useragents.txt')[random.randint(,len(load_config('useragents.txt'))-)].strip("\n"),
'Referer':load_config('referers.txt')[random.randint(,len(load_config('referers.txt'))-)].strip("\n"),
'Accept':load_config('acceptall.txt')[random.randint(,len(load_config('acceptall.txt'))-)].strip("\n"),
}
print(headers)

2020-04-25  00:52:04

最新文章

  1. C#中实现并发的几种方法的性能测试
  2. WCF学习之旅—WCF服务的WAS寄宿(十二)
  3. 递归 CTE
  4. Asp.Net MVC<六>:Controller、Action 待续
  5. 负载均衡、LVS概述
  6. MySQL的多实例
  7. KingPaper初探 wamp下本地虚拟主机的搭建
  8. C/C++ 对优先级与结合性的理解
  9. hibernate 反向生成 实体类
  10. EBS DBA指南笔记(二)
  11. WPF RadioButton的绑定
  12. Kong(V1.0.2)loadbalancing
  13. Android-Java多线程通讯(生产者 消费者)&10条线程对-等待唤醒/机制的管理
  14. jboos下载地址记录
  15. python 复制/移动文件
  16. android拾遗——Android之Service与IntentService的比较
  17. C#,数据类型扩展 z
  18. img-图片二进制流 64位前端显示
  19. 国际时区 TimeZone ID列表
  20. Ant Design 通过 WeekPicker 获取一周的起止时间

热门文章

  1. 阿里云centos7安装redis全过程记录
  2. 线程的创建方式以及synchronize的使用
  3. 一个很酷炫也挺实用的JS库leader-line
  4. Lists.newArrayList() 和 new ArrayList()的区别?
  5. 功能+自动化测试代码扫描(demo)
  6. React学习路径快速进入AntDesignPro开发
  7. Windows下生成IOS证书并发布APP安装到IPhone
  8. show me bug
  9. YAML 语言教程与使用案例
  10. 数据分析05 /pandas的高级操作