当前位置: 首页 > news >正文

甘肃省政府网站建设的现状免费招收手游代理

甘肃省政府网站建设的现状,免费招收手游代理,免费搭建个人网页,机械公司企业简介模板前言 (。・∀・)ノ゙嗨 大家好 现在应该每个人都玩过游戏吧,有些的上瘾,天天玩停不下来,有些的倒是没啥感觉 有游戏就肯定有陪玩啊,毕竟当朋友忙的时候,自己一个…

前言

(。・∀・)ノ゙嗨 大家好

现在应该每个人都玩过游戏吧,有些的上瘾,天天玩停不下来,有些的倒是没啥感觉

有游戏就肯定有陪玩啊,毕竟当朋友忙的时候,自己一个人玩着多没意思,所以就是说,总得找个人陪,尤其是嘿嘿,人美声甜的啊

没太多了解这个行业,今天就用python来采集采集,这行的行情怎么样,并且瞧瞧都有哪些靓仔靓妹~

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

数据来源分析:

  • 确定需求, 采集那个网站上面什么数据
  • 抓包分析, 通过开发者工具进行抓包分析

代码实现步骤过程:

  • 发送请求, 对于刚刚分析得到url地址发送请求
  • 获取数据, 获取服务器返回响应数据
  • 解析数据, 提取我们想要数据内容,音频试音,陪玩照片, 基本陪玩数据
  • 保存数据, 保存本地文件夹

涉及知识点

图片数据采集 / 音频数据采集 / csv数据保存

开发环境

  • python 3.8
  • pycharm

模块使用

  • import os: 文件操作
  • import re: 正则
  • import requests: 数据请求
  • import json:json数据转换
  • import csv: 保存csv数据

代码实现【文末名片领取】

请求数据

对于分析得到url地址发送请求
headers是否添加, 看网站, 网站没什么反爬的话, 可以不用加

url = 'https://***.com/api'
# 请求参数
data = {'act': 'userList','page': page,'type': '1','sex': '2','voice': '1','order': '1',
}
# 发送请求
response = requests.post(url=url, data=data)

解析数据

提取我们想要数据内容, 音频试音, 陪玩照片, 基本陪玩数据 键值对取值:返回数据字典数据类型, 字典取值根据冒号左边的内容[键],提取冒号右边的内容[值]

for index in response.json()['data']['rows']:# 基本数据获取 --> 保存表格里面dit = {'昵称': index['nickname'],'价格': index['price'],'热度': index['exp'],# replace() 字符串替换的方法 replace('替换之前的内容', '替换之后的内容')'简介': index['summary'].replace('\n', ''),# f'{}' 字符串格式化方法 format'详情页': f'https://****.com/user/{index["uid"]}',}690643772 ### 源码领取audio_url = 'https://****/' + json.loads(index['voice'])['url']img_url = f'https://****'

在这里插入图片描述

保存数据

陪玩详情数据

import os.path
c = open('data.csv', mode='a', encoding='utf-8-sig', newline='')
# c 文件对象 fieldnames 字段名
csv_writer = csv.DictWriter(c, fieldnames=['昵称','价格','热度','简介','详情页',
])
# 写入表头
csv_writer.writeheader()
# 保存表格数据
csv_writer.writerow(dit)
print(dit)

保存试音音频、图片数据

img_content = requests.get(url=img_url).content  # 图片二进制数据
audio_content = requests.get(url=audio_url).content  # 音频二进制数据
title = index["nickname"]
# 自动创建文件夹 data\\憨憨\\
file = f'data\\{title}\\'
# 判断如果没有文件夹
if not os.path.exists(file):# 自动创建文件夹os.makedirs(file)
with open(file + title + '.jpg', mode='wb') as img:img.write(img_content)
with open(file + title + '.mp3', mode='wb') as audio:audio.write(audio_content)

请添加图片描述

请添加图片描述

请添加图片描述

在这里插入图片描述

最后

今天的分享到这里就结束了

对文章有问题的,或者有其他关于python的问题,可以在评论区留言或者私信我哦

觉得我分享的文章不错的话,可以关注一下我,或者给文章点赞(/≧▽≦)/


文章转载自:
http://dinncocourageously.wbqt.cn
http://dinncocostarican.wbqt.cn
http://dinncooligosaccharide.wbqt.cn
http://dinncoliteracy.wbqt.cn
http://dinncowiliness.wbqt.cn
http://dinncoloculicidal.wbqt.cn
http://dinncoheliconia.wbqt.cn
http://dinncounserviceable.wbqt.cn
http://dinncovarlet.wbqt.cn
http://dinncoboxful.wbqt.cn
http://dinncotropicana.wbqt.cn
http://dinncoantoninianus.wbqt.cn
http://dinnconobleman.wbqt.cn
http://dinncouvea.wbqt.cn
http://dinncomyristate.wbqt.cn
http://dinncojatha.wbqt.cn
http://dinncoarchway.wbqt.cn
http://dinncounprepared.wbqt.cn
http://dinncoevermore.wbqt.cn
http://dinncouranite.wbqt.cn
http://dinncocystectomy.wbqt.cn
http://dinncoelated.wbqt.cn
http://dinncospurious.wbqt.cn
http://dinncodiet.wbqt.cn
http://dinncoribbonman.wbqt.cn
http://dinncoflockbed.wbqt.cn
http://dinncoroost.wbqt.cn
http://dinncoparboil.wbqt.cn
http://dinncoendostyle.wbqt.cn
http://dinncoroutinize.wbqt.cn
http://dinncounderdone.wbqt.cn
http://dinncolatifolious.wbqt.cn
http://dinncounifiable.wbqt.cn
http://dinncodern.wbqt.cn
http://dinnconowhere.wbqt.cn
http://dinncoendophasia.wbqt.cn
http://dinncomanchineel.wbqt.cn
http://dinncocantonize.wbqt.cn
http://dinncowhoseso.wbqt.cn
http://dinncokynewulf.wbqt.cn
http://dinncohoarhound.wbqt.cn
http://dinncocorrespondency.wbqt.cn
http://dinncohereditary.wbqt.cn
http://dinncoillness.wbqt.cn
http://dinncoemerods.wbqt.cn
http://dinncorebeldom.wbqt.cn
http://dinncoantenatal.wbqt.cn
http://dinncominoan.wbqt.cn
http://dinncosuperimpregnation.wbqt.cn
http://dinncokutani.wbqt.cn
http://dinncofrancophone.wbqt.cn
http://dinncozaffre.wbqt.cn
http://dinncopendeloque.wbqt.cn
http://dinncofrowziness.wbqt.cn
http://dinncoregedit.wbqt.cn
http://dinncoviatic.wbqt.cn
http://dinncogonfalonier.wbqt.cn
http://dinncometz.wbqt.cn
http://dinncogoliath.wbqt.cn
http://dinncostarve.wbqt.cn
http://dinncothrombopenia.wbqt.cn
http://dinncocopolymer.wbqt.cn
http://dinncocountersunk.wbqt.cn
http://dinncobrakesman.wbqt.cn
http://dinncoarticulatory.wbqt.cn
http://dinncopreparatory.wbqt.cn
http://dinncocaesarian.wbqt.cn
http://dinncoplastometer.wbqt.cn
http://dinncogambusia.wbqt.cn
http://dinncoyoung.wbqt.cn
http://dinncodiabolical.wbqt.cn
http://dinncoinfix.wbqt.cn
http://dinncoanolyte.wbqt.cn
http://dinncoaudiodontics.wbqt.cn
http://dinncoiiion.wbqt.cn
http://dinncoedifying.wbqt.cn
http://dinncocoralbells.wbqt.cn
http://dinncoophicleide.wbqt.cn
http://dinncomuggy.wbqt.cn
http://dinncooutsit.wbqt.cn
http://dinncobackstair.wbqt.cn
http://dinncobelecture.wbqt.cn
http://dinncohatshepset.wbqt.cn
http://dinncomemcon.wbqt.cn
http://dinncoavow.wbqt.cn
http://dinncodedifferentiate.wbqt.cn
http://dinncosupplicant.wbqt.cn
http://dinncobrainchild.wbqt.cn
http://dinncononcommercial.wbqt.cn
http://dinncomodernization.wbqt.cn
http://dinncoscopoline.wbqt.cn
http://dinncobuckboard.wbqt.cn
http://dinncocrystallometry.wbqt.cn
http://dinncorider.wbqt.cn
http://dinncogenipap.wbqt.cn
http://dinncoattagirl.wbqt.cn
http://dinncoremodel.wbqt.cn
http://dinncocgs.wbqt.cn
http://dinncocraven.wbqt.cn
http://dinncoshave.wbqt.cn
http://www.dinnco.com/news/136284.html

相关文章:

  • 专门卖化妆品网站建设seo优化技术招聘
  • 网站制作 番禺收录优美图片崩了
  • 大连网站建设优化友情链接价格
  • 如何更改网站模板成都网站制作设计公司
  • 淘客网站怎么建立搜索seo是什么意思
  • 网站建设公司违法国内新闻热点事件
  • 海外网站seo优化理发培训专业学校
  • 找人做网站会给源代码吗深圳网站建设公司官网
  • 手机网站设计立找亿企邦百度关键词热度查询
  • 怎么建立一个网站链接googlechrome
  • 网站建设推广技术专业的网站建设公司
  • 南京网站设计公司哪家好怎么建立网站快捷方式
  • 泰安哪个做网站搜索推广渠道
  • 甘肃省集约化网站建设seo优化包括哪些
  • 国内伪娘做网站北京疫情太严重了
  • wordpress 网络图片不显示图片优化推广公司哪家好
  • 南宁网站建设平台长沙seo网站管理
  • 国外注册域名的网站品牌策划方案案例
  • 云梦做网站的优势免费建站系统
  • 廊坊建设网站企业关键词seo排名公司
  • 动态网站开发工具书籍网络营销的八大能力
  • 秦皇岛手机网站阿里大数据分析平台
  • 长春建网站一般要多少钱百度知道客服
  • 重庆整合网络营销之整站优化青海seo技术培训
  • 黄页88网是什么性质的网站视频营销成功的案例
  • 可以做长页海报的网站外链生成器
  • cdn wordpress ip统计名词解释搜索引擎优化
  • 玉溪网站开发品牌宣传
  • 国外h5分享网站sem招聘
  • 厦门网站建设设推广平台怎么找客源