• 2024-10-09Python爬虫爬取快手视频代码
    importpprintimportrequestsimportosimportreimportjsondefget_response(url,keywords,pcursor):hearders={‘Accept’:‘/’,‘Accept-Encoding’:‘gzip,deflate,br’,‘Accept-Language’:‘zh-CN,zh;q=0.9’,‘Connection’:‘keep-alive’,
  • 2024-07-07简单爬虫案例——爬取快手视频
    网址:aHR0cHM6Ly93d3cua3VhaXNob3UuY29tL3NlYXJjaC92aWRlbz9zZWFyY2hLZXk9JUU2JThCJTg5JUU5JTlEJUEy找到视频接口:视频链接在photourl中 完整代码:importrequestsimportreurl='https://www.kuaishou.com/graphql'cookies={'did':'web_9e8cfa4403
  • 2024-06-07feapder框架爬取ks评论_递归的方式
    importrandomimportreimporttimefromfeapder.db.mysqldbimportMysqlDBimportfeapderdefis_number(string):pattern=re.compile(r'^[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?$')returnbool(pattern.match(string))classAirSpiderDemo(feapder.Ai