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

做一个flash网站多少钱打广告

做一个flash网站多少钱,打广告,西安企业网站建设哪家专业,网站地址栏图标怎么做目前wiz笔记的docker版本停留在1.0.31版本,想要使用最新的功能就不能使用docker自建的服务端了,于是打算在现有基础上根据webAPI的内容对其进行二次开发 目前解析出来的接口都是我急需使用的,大家可以参考,我会在未来慢慢开发完善…

目前wiz笔记的docker版本停留在1.0.31版本,想要使用最新的功能就不能使用docker自建的服务端了,于是打算在现有基础上根据webAPI的内容对其进行二次开发
目前解析出来的接口都是我急需使用的,大家可以参考,我会在未来慢慢开发完善的

import requests,re
from bs4 import BeautifulSoup
class wiz:def __init__(self,username,password,domain):self.username = usernameself.password = passwordself.token = ""self.kbGuid = ''self.headers = {}self.data = []self.domain = domainself.update_url()  # 初始化 URLdef update_url(self):self.url={"getWizToken":f"{self.domain}/as/user/login","getFolder":f"{self.domain}/ks/category/all/{self.kbGuid}","logOut":f"{self.domain}/as/user/logout","getMessageList":f"{self.domain}/ks/note/list/category/{self.kbGuid}","getMessage":f"{self.domain}/ks/note/download/{self.kbGuid}/",}def getWizToken(self):params = {'clientType': 'web','clientVersion': '4.0','lang': 'zh-cn',}json_data = {'userId': self.username,'password': self.password,'autoLogin': True,'domain': 'clouded.top','deviceId': None,}response = requests.post(self.url['getWizToken'],params=params,json=json_data,).json()if response['returnCode'] == 200:#登陆成功self.token = response["result"]["token"]self.kbGuid = response["result"]["kbGuid"]self.update_url()self.headers["X-Wiz-Token"] = self.tokenelif response['returnCode'] == 31002:#用户名密码错误print(response["returnMessage"])def getFolder(self):response = requests.get(self.url['getFolder'],headers=self.headers).json()for item in response['result']:# print(item)self.getMessageList(item)def logOut(self):params = {'domain': 'clouded.top','clientType': 'web','clientVersion': '4.0','lang': 'zh-cn',}requests.get(self.url['logOut'], params=params,headers=self.headers)def getMessageList(self,path):params = {'lang': 'zh-cn','category': path,'start': '0','count': '100','orderBy': 'modified','ascending': 'desc','withAbstract': 'true','withFavor': 'false','withShare': 'true','clientType': 'web','clientVersion': '4.0',}response = requests.get(self.url['getMessageList'],params=params,headers=self.headers).json()res=response['result']for r in res:title=r['title']uid=r['docGuid']self.getMessage(uid,path)def getMessage(self,uid,path):params = {'downloadInfo': '1','downloadData': '1','withFavor': 'false','withShare': 'true','clientType': 'web','clientVersion': '4.0','lang': 'zh-cn',}response = requests.get(f'{self.url['getMessage']}{uid}',params=params,headers=self.headers).json()wordCount,imageCount = self.wordCount(response['html'])audioCount = 0print(f"getOK-{path}{response['info']['title']}")if response['resources']:for i in response['resources'] :if 'wiz' not in i['name'] and 'audio.png' in i['name']:imageCount -= 1#音频资源的图标会错误的解析为图片audioCount += int(i['size']/1024/4.5)#音频长度累加 单位:s  粗略估计self.data.append({"path":f"{path}","title":response['info']['title'],"owner":response['info']['owner'],"wordCount":wordCount,"imageCount":imageCount,"audioCount":audioCount,"accessed":response['info']['accessed'],"created":response['info']['created']})def wordCount(self,html):soup = BeautifulSoup(html,'html.parser')for elem in soup(['style', 'script', 'head', 'title', 'meta']):elem.decompose()char_count = len(re.sub(r'\s', '', soup.get_text()))image_count = len(soup.find_all('img'))return char_count,image_countdef showData(self):# for one in self.data:#     print(one)# print(self.data)return self.data#main=wiz(username="admin@wiz.cn",password="123456",domain="http://120.349.12.333:9192")
main.getWizToken()
main.getFolder()
data=main.showData()main.logOut()

大家可以自行运行代码,更改账号密码以及服务器链接就可以查看自己服务器上的文章信息,目前还在开发中…
目前基于这个写了一个文章总览页面,类似Github的代码热力图
在这里插入图片描述
有兴趣的话可以在下一章放出源代码

http://www.dtcms.com/wzjs/72577.html

相关文章:

  • 服装网站建设物流配送系统免费优化网站
  • 公司品牌官网建站网站单向外链推广工具
  • 做网站交互朋友圈广告推广文字
  • 电子商务主要是什么潍坊seo按天收费
  • 网络优化首先要有网站加强服务保障满足群众急需m
  • 淮北论坛最新招聘信息网佛山网站优化软件
  • 郑州网站的建设什么是论坛推广
  • 最新网站建设进度表seo宣传网站
  • 新疆做网站多少钱打广告推广怎么做
  • 北京网站建设好吗免费个人推广引流平台
  • 免费招人的平台seo系统培训哪家好
  • 软件站营销方法
  • 自己做网站 做什么好sem网络营销
  • 上海网站建设运营站霸网络山东大学经济研究院
  • 网站创建价格优化大师电脑版官方
  • wordpress 点击文章福州seo网站推广优化
  • 深圳营销网站建设公司国内seo排名分析主要针对百度
  • 做外贸自己的公司网站黄页网络的推广
  • 学ps可以做网站策划吗注册安全工程师
  • 方又圆网站建设百度竞价怎么操作
  • 免费网页模版下载南京百度seo代理
  • 只知道网站后台怎么做301百青藤广告联盟
  • 网站优化软件有哪些网站推广的营销策划方案
  • 做网站基本百度关键词搜索引擎
  • 全媒体网站的建设方案无锡百度seo优化
  • logo灵感网站百度网盘搜索引擎入口
  • 深圳网站建设培训班个人网站制作模板主页
  • 衡阳网站建设icp备淘宝搜索排名
  • 周口seo 网站做百度推广需要什么条件
  • 一流的江苏网站建设惠州seo按天付费