资源简介
浙江线上大学刷课脚本,****************************************************************************
代码片段和文件信息
# -*- coding=utf-8 -*-
import requests
import urllib.parse
import json
import time
from moviepy.editor import VideoFileClip
lvt=str(int(time.time()))
lvpt=str(int(time.time())+70)
getprofile=‘http://student.zjedu.moocollege.com/nodeapi/3.0.1/student/system/getProfile‘
getunitdetial=‘http://student.zjedu.moocollege.com/nodeapi/3.0.1/teacher/course/plan/unit/getDetail‘
getinfo=‘http://student.zjedu.moocollege.com/nodeapi/3.0.1/common/ccPlayer/getInfo‘
listurl=‘http://student.zjedu.moocollege.com/nodeapi/3.0.1/student/course/system/list‘
sessionlist=‘http://student.zjedu.moocollege.com/nodeapi/3.0.1/student/course/plan/list‘
loginurl=‘http://student.zjedu.moocollege.com/nodeapi/3.0.1/student/system/login‘
upurl=‘http://student.zjedu.moocollege.com/nodeapi/3.0.1/student/course/uploadLearnRate‘
listrequest=‘{“status“: ““ “search“: ““ “current“: 1 “pageSize“: 12}‘
def headers(tokenrealnameavatar):
headers={
‘Accept‘:‘*/*‘
‘Accept-Encoding‘:‘gzip deflate‘
‘Accept-Language‘:‘zh-CNzh;q=0.9en-GB;q=0.8en;q=0.7‘
‘Content-Length‘:‘97‘
‘Content-Type‘:‘application/json‘
‘Cookie‘:‘NOISSESUDEJZXJ=s%3AwBhkXjYw8eZVmKQxEGZC6Y7MKwbeHvbA.hnigrPSAapNR1AEraLjYJhPnjhwqje8UrwL8pIyBAEU; Hm_lvt_70a5d649dfa86aee3afdc28e95ee2c41=‘+lvt+‘; Hm_lpvt_70a5d649dfa86aee3afdc28e95ee2c41=‘+lvpt+‘; token-student-zjedu=‘+token+‘; realname-student-zjedu=‘+realname+‘; avatar-student-zjedu=‘+avatar
‘DNT‘:‘1‘
‘Host‘:‘student.zjedu.moocollege.com‘
‘Origin‘:‘http://student.zjedu.moocollege.com‘
‘Referer‘:‘http://student.zjedu.moocollege.com/system/login‘
‘User-Agent‘:‘Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML like Gecko) Chrome/66.0.3355.4 Safari/537.36‘
}
return headers
def cookiesmaker(tokenrealnameavatar):
token=urllib.parse.quote(‘“‘+token+‘“‘)
realname=urllib.parse.quote(‘“‘+realname+‘“‘)
if avatar!=‘null‘ or avatar!=‘None‘:
avatar = urllib.parse.quote(‘“‘ + str(avatar) + ‘“‘)
# cookies=‘NOISSESUDEJZXJ=s%3AwBhkXjYw8eZVmKQxEGZC6Y7MKwbeHvbA.hnigrPSAapNR1AEraLjYJhPnjhwqje8UrwL8pIyBAEU; Hm_lvt_70a5d649dfa86aee3afdc28e95ee2c41=‘+lvt+‘; Hm_lpvt_70a5d649dfa86aee3afdc28e95ee2c41=‘+lvpt+‘; token-student-zjedu=‘+token+‘; realname-student-zjedu=‘+realname+‘; avatar-student-zjedu=‘+avatar
return headers(tokenrealnameavatar)
if __name__ == ‘__main__‘:
session=requests.session()
session.headers = headers(‘““‘‘““‘‘““‘)
while True:
username=str(input(‘请输入学号,回车结束: ——>‘))
password=str(input(‘请输入密码,回车结束: ——>‘))
# username=‘‘
# password = ‘‘
userdata=json.loads(‘{“orgId“: 64 “username“: “‘+ username+‘“ “password“: “‘+password+‘“ “type“: “studentNo“ “rememberMe“: false}‘)
print
相关资源
- Python爬虫爬取校内论坛标题,并将关
- python网络爬虫爬取Boss直聘代码
- Python爬取论文标题、作者、摘要等信
- python爬虫的随机请求头+随机代理
- 爬取汽车之家指定配置信息
- 汽车之家图片爬取
- Python Scrapy爬虫爬取微博和微信公众号
- python爬虫网站图片
- sina_crawl.rar
- 新浪财经24小时python爬虫程序内置企业
- python 爬取图片
- python 爬虫的程序
- Python3爬虫入门到精通课程视频附软件
- 利用selenium对拉勾网的爬虫并将数据导
- Python3爬虫-v2
- python爬取视频源代码
- 利用python的scrapy爬取慕课网全站课程
- 基于python scrapy 的双色球爬虫
- python3 网络爬虫 多线程 无限爬网址
- Python爬取微博评论代码
- python3.x实现智联招聘网站岗位信息爬
- 闲鱼爬虫,可以爬取商品
- python3 网络爬虫实战
- 爬取知网的社科基金项目文章信息
- python爬虫房天下商品房数据
- python爬取雅虎财经股票交易数据
- python爬虫爬取58租房信息
- 基于python网络爬虫安居客新房信息爬
- 豆瓣和IMDB上电影的对比爬虫
- 人人贷爬虫代码
评论
共有 条评论