Giter Club home page Giter Club logo

decryptlogin's Introduction


docs PyPI - Python Version PyPI license PyPI - Downloads PyPI - Downloads issue resolution open issues

Documents-CN: https://httpsgithubcomcharlespikachudecryptlogin.readthedocs.io/zh/latest/

Documents-EN: https://httpsgithubcomcharlespikachudecryptlogin.readthedocs.io/en/latest/

DecryptLogin

APIs for loginning some websites by using requests.
You can star this repository to keep track of the project if it's helpful for you, thank you for your support.

Statements

This repo is created for learning python.
If I find that anyone leverage this project in an illegal way, I will delete this project immediately.

本项目仅供python爱好者学习使用, 若作者发现该项目以任何不正当方式被使用, 将立即删除该项目。
希望大家合理利用该项目🙂

Login with Requests

Install

Preparation

  • Nodejs: Since some of the supported websites need to compile the js code, you should install the nodejs in your computer.

Pip install

run "pip install DecryptLogin"

Source code install

(1) Offline
Step1: git clone https://github.com/CharlesPikachu/DecryptLogin.git
Step2: cd DecryptLogin -> run "python setup.py install"
(2) Online
run "pip install git+https://github.com/CharlesPikachu/DecryptLogin.git@master"

Support List

Website_EN PC Mode Mobile Mode ScanQR Mode Website_CN
weibo 新浪微博
douban 豆瓣
github Github
music163 网易云音乐
zt12306 **铁路12306
QQZone QQ空间
QQQun QQ群
QQId 我的QQ中心
zhihu 知乎
bilibili B站
toutiao 今日头条
taobao 淘宝
jingdong 京东
ifeng 凤凰网
sohu 搜狐
zgconline 中关村在线
lagou 拉勾网
twitter 推特
eSurfing 天翼
renren 人人网
w3cschool W3Cschool(编程狮)
fishc 鱼C论坛
youdao 有道
baidupan 百度网盘
stackoverflow Stackoverflow
codalab CodaLab
pypi PyPi
douyu 斗鱼直播
migu 咪咕音乐
qunar 去哪儿旅行
mieshop 小米商城
mpweixin 微信公众号
baidutieba 百度贴吧
dazhongdianping 大众点评
jianguoyun 坚果云
cloud189 天翼云盘
qqmusic QQ音乐
ximalaya 喜马拉雅
icourse163 **大学MOOC
xiaomihealth 小米运动
tencentvideo 腾讯视频
baidu 百度
alipan 阿里云盘

Quick Start

login.Login

from DecryptLogin import login

# the instanced Login class object
lg = login.Login()
# use the provided api function to login in the target website (e.g., twitter)
infos_return, session = lg.twitter(username='Your Username', password='Your Password')

login.Client

from DecryptLogin import login

# the instanced client
client = login.Client()
# the instanced weibo
weibo = client.weibo(reload_history=True)
# use the login function to login in weibo
infos_return, session = weibo.login('me', 'pass', 'scanqr')

Practice with DecryptLogin

Install

Preparation

  • ffmpeg: You should set ffmpeg in environment variable.
  • aria2c: You should set aria2c in environment variable.

Pip install

run "pip install DecryptLoginExamples"

Support List

Project_EN Introduction Core Code Project_CN
weibomonitor click click 微博监控
qqreports click click 生成QQ个人专属报告
bilibiliuservideos click click 下载B站指定UP主的所有视频
neteasesonglistdownloader click click 网易云个人歌单下载器
neteaselistenleaderboard click click 网易云个人听歌排行榜
userweibospider click click 下载指定微博用户的所有微博数据
neteasesignin click click 网易云音乐自动签到
weiboemoji click click 微博表情包爬取
weibosender click click 大吼一声发微博
tbgoods click click 淘宝商品数据小爬虫
jdgoods click click 京东商品数据小爬虫
delallweibos click click 批量删除微博
clearqzone click click 批量删除QQ空间说说
neteaseeveryday click click 在终端看网易云每日歌曲推荐
neteaseclickplaylist click click 网易云音乐刷歌曲播放量
cloud189signin click click 天翼云盘自动签到+抽奖
moocdl click click **大学MOOC下载器
modifymihealthsteps click click 修改小米运动中的步数
taobaosnap click click 淘宝抢购脚本
jingdongsnap click click 京东抢购脚本
bilibiliupmonitor click click B站UP主监控
bilibililottery click click B站监控关注的UP主并自动转发抽奖
weibowater click click 微博水军
weiboblacklist click click 微博批量拉黑脚本
weibolottery click click 微博自动转发抽奖

Quick Start

from DecryptLoginExamples import clientconfig = {
    'username': 'charlespikachu', 
    'time_interval':  1800,
}
crawler_executor = client.Client()
crawler_executor.executor('bilibililottery', config=config)

Thanks List

Author Time Contribution
@skygongque 2020-02-13 add verification code processing in (weibo, pc)

Citation

If you use this project in your research, please cite this project:

@misc{decryptlogin2020,
    author = {Zhenchao Jin},
    title = {DecryptLogin: APIs for loginning some websites by using requests},
    year = {2020},
    publisher = {GitHub},
    journal = {GitHub repository},
    howpublished = {\url{https://github.com/CharlesPikachu/DecryptLogin}},
}

Projects in Charles_pikachu

  • Games: Create interesting games by pure python.
  • DecryptLogin: APIs for loginning some websites by using requests.
  • Musicdl: A lightweight music downloader written by pure python.
  • Videodl: A lightweight video downloader written by pure python.
  • Pytools: Some useful tools written by pure python.
  • PikachuWeChat: Play WeChat with itchat-uos.
  • Pydrawing: Beautify your image or video.
  • ImageCompressor: Image compressors written by pure python.
  • FreeProxy: Collecting free proxies from internet.
  • Paperdl: Search and download paper from specific websites.
  • Sciogovterminal: Browse "The State Council Information Office of the People's Republic of China" in the terminal.
  • CodeFree: Make no code a reality.
  • DeepLearningToys: Some deep learning toys implemented in pytorch.
  • DataAnalysis: Some data analysis projects in charles_pikachu.
  • Imagedl: Search and download images from specific websites.
  • Pytoydl: A toy deep learning framework built upon numpy.
  • NovelDL: Search and download novels from some specific websites.

More

WeChat Official Accounts

Charles_pikachu
img

decryptlogin's People

Contributors

charlespikachu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

decryptlogin's Issues

微博PC端登录失败

res_json的值为{'retcode': 0, 'msg': 'system error', 'exectime': 2}
感觉是微博强制开启了登录扫码验证

知乎登陆错误

邮箱和密码是正确的,但是就是返回错误信息。是不是被知乎官方给屏蔽了?
Input the Verification Code:5UDK
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\Jimmy\Anaconda3\envs\pyvisual36\lib\site-packages\DecryptLogin\platforms\zhihu.py", line 560, in login
raise RuntimeError(res_json.get('error').get('message'))
RuntimeError: 该邮箱尚未注册知乎

安装不了

你好想问一下啊我用 python setup.py install 时遇到这种错误该怎么解决啊,我试过了用管理员身份运行命令行,也是一样的错误
running install
error: can't create or remove files in install directory

The following error occurred while trying to add or remove files in the
installation directory:

[Errno 13] Permission denied: 'C:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.7_3.7.2032.0_x64__qbz5n2kfra8p0\\Lib\\site-packages\\test-easy-install-20832.write-test'

The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:

C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.7_3.7.2032.0_x64__qbz5n2kfra8p0\Lib\site-packages\

Perhaps your account does not have write access to this directory? If the
installation directory is a system-owned directory, you may need to sign in
as the administrator or "root" account. If you do not have administrative
access to this machine, you may wish to choose a different installation
directory, preferably one that is listed in your PYTHONPATH environment
variable.

For information on other options, you may wish to consult the
documentation at:

https://setuptools.readthedocs.io/en/latest/easy_install.html

Please make the appropriate changes for your system and try again.

知乎登陆报错,缺少标识符

报错内容如下:
Traceback (most recent call last):
File "E:/projects/DailyWork/weblook/web_test1.py", line 5, in
infos_return, session = lg.zhihu('18571087911', 'kexin5438', 'pc')
File "E:\projects\DailyWork\venv\lib\site-packages\DecryptLogin\platforms\zhihu.py", line 542, in login
data = js.call('encrypt', urlencode(data))
File "E:\projects\DailyWork\venv\lib\site-packages\execjs_abstract_runtime_context.py", line 37, in call
return self._call(name, *args)
File "E:\projects\DailyWork\venv\lib\site-packages\execjs_external_runtime.py", line 93, in _call
return self.eval("{identifier}.apply(this, {args})".format(identifier=identifier, args=args))
File "E:\projects\DailyWork\venv\lib\site-packages\execjs_external_runtime.py", line 78, in eval
return self.exec
(code)
File "E:\projects\DailyWork\venv\lib\site-packages\execjs_abstract_runtime_context.py", line 18, in exec

return self.exec(source)
File "E:\projects\DailyWork\venv\lib\site-packages\execjs_external_runtime.py", line 89, in exec
return self._extract_result(output)
File "E:\projects\DailyWork\venv\lib\site-packages\execjs_external_runtime.py", line 169, in _extract_result
raise ProgramError(value)
execjs._exceptions.ProgramError: SyntaxError: 缺少标识符

应该是在popen调用cscript.exe的时候报错的
源码是这样的:
p = Popen(cmd, stdout=PIPE, stderr=PIPE, cwd=self._cwd, universal_newlines=True)
stdoutdata, stderrdata = p.communicate()
ret = p.wait()

cmd打印出来是:
['C:\Windows\system32\cscript.EXE', '//E:jscript', '//Nologo', 'C:\Users\kexin\AppData\Local\Temp\execjs5x6h8ayz.js']

请问这个问题怎么解决,谢谢

weibo监控的一个建议

感谢大佬代码,我在你的基础上添加了同时监控多名博主的微博,运行一段时间后就是无法运行了,cookies一直报list out of range, 但浏览器能打开,不知是不是程序重启后,登录的cookies没有重置呀?
另外,有个建议,就是要实现多博主监控,可以通过登录用户关注多名博主,然后检测登录用户主页最新微博,就能刷到所有关注的博主动态啦。这样可以降低爬虫爬取多名博主页面的问题。

对于二维码的建议

可不可以以文件的形式返回二维码,如果我想把爬虫封装成一个服务的话,没法将直接打开的二维码传输回前端来验证。

Bilibili登录时出现“服务繁忙,请稍后重试”

你好,我在登陆bilibili时,刚开始的时候可以正常登录,成功一两次后再登录就会出现Runtime Error:服务繁忙,请稍后重试。这是bilibili的防范措施吗?我在网上搜了其他人的解决方案还是解决不了,请问有什么措施吗?

Bilibili登录时出现Runtime Error:None的情况

在登录时,我的账号由于有异常,在运行时出现了Runtime Error:None,调试发现res_json['data']['status'] == 1,这里判断失败,不能正常登录,将账号还原为无异常情况便可正常进行登录了。

知乎手机号登录失败

错误信息:{'message': '为了您的帐号安全,请使用短信验证码登录', 'code': 120017} 登录失败

登录Twitter报错

登录Twitter报错

authenticity_token = re.findall(pattern, res.text)[0]
IndexError: list index out of range

网易云音乐报错

music163.py 119 login
raise RuntimeError(res_json.get('msg')) if 'msg' in res_json else RuntimeError(r
es_json.get('message'))

RuntimeError:
Cheating
这是检测出来作弊了?

网易云个人歌单下载中发现的一些bug

个人使用过程中发现了两个bug,进行了一些修改,可供参考(python新手,代码可能比较菜)
1、若文件名不符合要求时,会出现错误如下
001
个人将文件名进行了自动修改,或许亦可以做成手动的
006

2、获取的歌曲信息中某些行的列表中存在一个或多个None,原因个人也不太清楚,会导致错误
002
003
004
这里个人就简单的做了一个删除处理
005

暂时发现了这两个问题。软件本身还是非常好用的,也很感谢作者的努力。本人水平有限,提出的解决方法仅供参考。

b站指定up主下载视频不全

老哥你是真的猛,但是我在使用您的工具下载b站指定up主视频时,获取视频的总数目为该up主的投稿数量。

其实我是想用来爬教学课程,避免被下架后看不了的~~,存在一个视频集由几十个视频组成的情况,但借助该工具下载时,默认只会下载视频集的第一个视频,剩下的视频没有做处理。

本来想自己调试好的,但是能力有限,downloadUserVideos.py文件的__downloadVideos方法中相关内容期待老哥能够补全一下,感激不尽!

知乎需要手机验证码

登录时返回:{'error': {'message': '为了您的帐号安全,请使用短信验证码登录', 'code': 120017}}

bil

Traceback (most recent call last):
File "downloadUserVideos.py", line 173, in
bili.run()
File "downloadUserVideos.py", line 42, in run
self.__downloadVideos(userid)
File "downloadUserVideos.py", line 100, in __downloadVideos
if 'dash' in res_json['data']:
TypeError: argument of type 'NoneType' is not iterable

豆瓣无法登录

from DecryptLogin import login

lg = login.Login()
infos_return, session = lg.douban(username='****', password='****', mode='pc')

报错

    infos_return, session = lg.douban(username='17378581820', password='6987139899db', mode='pc')
  File "C:\Users\木羊羽\AppData\Roaming\Python\Python39\site-packages\DecryptLogin\core\douban.py", line 113, in login
    return selected_api.login(**args)
  File "C:\Users\木羊羽\AppData\Roaming\Python\Python39\site-packages\DecryptLogin\core\douban.py", line 27, in login
    self.session.get(self.home_url)
  File "C:\Users\木羊羽\AppData\Roaming\Python\Python39\site-packages\requests\sessions.py", line 555, in get
    return self.request('GET', url, **kwargs)
  File "C:\Users\木羊羽\AppData\Roaming\Python\Python39\site-packages\requests\sessions.py", line 542, in request
    resp = self.send(prep, **send_kwargs)
  File "C:\Users\木羊羽\AppData\Roaming\Python\Python39\site-packages\requests\sessions.py", line 655, in send
    r = adapter.send(request, **kwargs)
  File "C:\Users\木羊羽\AppData\Roaming\Python\Python39\site-packages\requests\adapters.py", line 439, in send
    resp = conn.urlopen(
  File "C:\Users\木羊羽\AppData\Local\Programs\Python\Python39\lib\site-packages\urllib3\connectionpool.py", line 696, in urlopen
    self._prepare_proxy(conn)
  File "C:\Users\木羊羽\AppData\Local\Programs\Python\Python39\lib\site-packages\urllib3\connectionpool.py", line 964, in _prepare_proxy
    conn.connect()
  File "C:\Users\木羊羽\AppData\Local\Programs\Python\Python39\lib\site-packages\urllib3\connection.py", line 359, in connect
    conn = self._connect_tls_proxy(hostname, conn)
  File "C:\Users\木羊羽\AppData\Local\Programs\Python\Python39\lib\site-packages\urllib3\connection.py", line 500, in _connect_tls_proxy
    return ssl_wrap_socket(
  File "C:\Users\木羊羽\AppData\Local\Programs\Python\Python39\lib\site-packages\urllib3\util\ssl_.py", line 432, in ssl_wrap_socket
    ssl_sock = _ssl_wrap_socket_impl(sock, context, tls_in_tls)
  File "C:\Users\木羊羽\AppData\Local\Programs\Python\Python39\lib\site-packages\urllib3\util\ssl_.py", line 474, in _ssl_wrap_socket_impl
    return ssl_context.wrap_socket(sock)
  File "C:\Users\木羊羽\AppData\Local\Programs\Python\Python39\lib\ssl.py", line 500, in wrap_socket
    return self.sslsocket_class._create(
  File "C:\Users\木羊羽\AppData\Local\Programs\Python\Python39\lib\ssl.py", line 997, in _create
    raise ValueError("check_hostname requires server_hostname")
ValueError: check_hostname requires server_hostname

微博 pc 端登录问题

微博 PC 端目前登录好像需要扫码登录, 有解决办法吗
image
实现类似于接打码平台一样的自动化
现在通过扫码解决的话, 长时间运行不是很方便

微博无法登陆了

使用weibo(username, password, 'mobile')登录,会提示“RuntimeError: login second verify”
浏览器中登录发现,m.weibo.cn登录需要验证手机短信,应该是微博手机版登录机制修改了。
希望有办法解决,谢谢。

知乎登录报错

您好!,那段js代码解析json报错,报错情况如下:
Traceback (most recent call last):
File "zhihuLogin.py", line 353, in
infos_return, session = lg.zhihu(username, password, 'pc')
File "D:\Program_Files\Python\Python37\lib\site-packages\DecryptLogin\platforms\zhihu.py", line 553, in login
data = js.call('Q', urlencode(data))
File "D:\Program_Files\Python\Python37\lib\site-packages\execjs_abstract_runtime_context.py", line 37, in call
return self._call(name, *args)
File "D:\Program_Files\Python\Python37\lib\site-packages\execjs_external_runtime.py", line 92, in _call
return self.eval("{identifier}.apply(this, {args})".format(identifier=identifier, args=args))
File "D:\Program_Files\Python\Python37\lib\site-packages\execjs_external_runtime.py", line 78, in eval
return self.exec
(code)
File "D:\Program_Files\Python\Python37\lib\site-packages\execjs_abstract_runtime_context.py", line 18, in exec

return self.exec(source)
File "D:\Program_Files\Python\Python37\lib\site-packages\execjs_external_runtime.py", line 88, in exec
return self._extract_result(output)
File "D:\Program_Files\Python\Python37\lib\site-packages\execjs_external_runtime.py", line 159, in extract_result
ret = json.loads(output_last_line)
File "D:\Program_Files\Python\Python37\lib\json_init
.py", line 348, in loads
return _default_decoder.decode(s)
File "D:\Program_Files\Python\Python37\lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "D:\Program_Files\Python\Python37\lib\json\decoder.py", line 353, in raw_decode
obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Expecting ',' delimiter: line 1 column 3 (char 2)

Stack Overflow好像无法实现登录了

Stack Overflow不登录情况下搜索帖子有上限,然后我通过下面代码去登录,但是搜索条目依然有限制,请问该怎么办
lg = login.Login()
infos_return, session = lg.stackoverflow('xxxxxxxxxxxxx','xxxxxxxxxxxx','pc')#打码
response = session.post(url,data=formdata,headers=headers)
page = response.content
root = html.fromstring(page)
totalnum = root.xpath('//*[@id="mainbar"]/div[4]/div[1]/text()')
print(totalnum)

微博登录验证码输入问题

from DecryptLogin import login
'''微博模拟登录'''
def login(username, password):
lg = login.Login()
infos_return, session = lg.weibo(username, password, 'pc')
return infos_return, session

我通过pc验证码登录,请问验证码是放在那里,只能每次乱输入一个验证码就报错
211

知乎登录报错

Traceback (most recent call last):
File "D:/Python_study/ZhihuSpider/test.py", line 600, in
zhihu().login('', '')
File "D:/Python_study/ZhihuSpider/test.py", line 559, in login
data = js.call('Q', urlencode(data))
File "D:\Python_study\ZhihuSpider\venv\lib\site-packages\execjs_abstract_runtime_context.py", line 37, in call
return self._call(name, *args)
File "D:\Python_study\ZhihuSpider\venv\lib\site-packages\execjs_external_runtime.py", line 92, in _call
return self.eval("{identifier}.apply(this, {args})".format(identifier=identifier, args=args))
File "D:\Python_study\ZhihuSpider\venv\lib\site-packages\execjs_external_runtime.py", line 78, in eval
return self.exec
(code)
File "D:\Python_study\ZhihuSpider\venv\lib\site-packages\execjs_abstract_runtime_context.py", line 18, in exec

return self.exec(source)
File "D:\Python_study\ZhihuSpider\venv\lib\site-packages\execjs_external_runtime.py", line 88, in exec
return self._extract_result(output)
File "D:\Python_study\ZhihuSpider\venv\lib\site-packages\execjs_external_runtime.py", line 167, in _extract_result
raise ProgramError(value)
execjs._exceptions.ProgramError: TypeError: base64 is not a function

Bilibili登陆问题

在登陆时,出现了can only concatenate str (not "bytes") to str报错,调试发现是bilibili.py的107行,因为登陆需要验证码,在第二次运行到这里的时候,password的类型从str变为了bytes。

转换后又出现了
OverflowError:191 bytes needed for message, but there is only space for 117的报错

暂未解决

在关注列表中选择监控用户后大概两分钟左右会报错(微博)

1-> 我设置的时间间隔3S,在运行大概2分钟左右时会报错。
cards = res.json()['data']['cards']
‘KeyError: 'data'’
2 -> 重新执行无法显示关注列表。显示如下:
‘’未指定想要监控的用户ID, 您关注的用户有:
(是否想选择其中一位进行监控?)


请选择您想要监控的用户编号(例如1):‘’

知乎提示-----登录次数过多

你好,请问我下载代码使用了新手教程里面的代码编了简单的登录脚本。但是执行之后提示

DecryptLogin\platforms\zhihu.py", line 573, in login
raise RuntimeError(res_json.get('error').get('message'))
RuntimeError: 登录过于频繁,请稍后重试,或者联系 [email protected]

上述提示信息是否意味着被识别了?如何解决

QQreports的程序中无法成功获取好友数据

代码的94行网址'https://qun.qq.com/cgi-bin/qun_mgr/get_friend_list'被调用的时候,返回值是res=== {'ec': 4, 'errcode': 0, 'em': 'basekey err [errcode:4:0]'} ,特来请教,是这个网页功能发生了更改变,还是我操作不正确。
I did the following:
1、run ‘python generate.py’
报错
image
2、打印报错字典,返回信息:
res=== {'ec': 4, 'errcode': 0, 'em': 'basekey err [errcode:4:0]'} ,其中无定义关键字“result”

知乎输入验证码失败

错误信息:
D:\python\python.exe C:/Users/Administrator/AppData/Roaming/JetBrains/PyCharm2020.2/scratches/scratch_2.py
Input the captcha:UE9y

Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Roaming\JetBrains\PyCharm2020.2\scratches\scratch_2.py", line 5, in
infos_return, session = lg.zhihu(username='17730222305', password='zyh123456')
File "D:\python\lib\site-packages\DecryptLogin\platforms\zhihu.py", line 542, in login
data = js.call('encrypt', urlencode(data))
File "D:\python\lib\site-packages\execjs_abstract_runtime_context.py", line 37, in call
return self._call(name, *args)
File "D:\python\lib\site-packages\execjs_external_runtime.py", line 92, in _call
return self.eval("{identifier}.apply(this, {args})".format(identifier=identifier, args=args))
File "D:\python\lib\site-packages\execjs_external_runtime.py", line 78, in eval
return self.exec
(code)
File "D:\python\lib\site-packages\execjs_abstract_runtime_context.py", line 18, in exec

return self.exec(source)
File "D:\python\lib\site-packages\execjs_external_runtime.py", line 88, in exec
return self._extract_result(output)
File "D:\python\lib\site-packages\execjs_external_runtime.py", line 167, in _extract_result
raise ProgramError(value)
execjs._exceptions.ProgramError: SyntaxError: 缺少标识符

百度贴吧模拟登录相关问题

扫描二维码登录时若网页提醒需要验证(比如说使用密码登录时由于各种原因需要验证码验证),程序会直接报错并退出。
猜测问题出在 /DecryptLogin/core/baidutieba.py : 78
而且报错后二维码并不会被删除。
提醒需要验证时报错我并不知道如何解决,报错删除二维码的话在第78行之前增加一个 removeImage(os.path.join(self.cur_path, 'qrcode.jpg')) 即可。

12306的例子跑不起来

def cracker(imagepath):
# 打开验证码图片
img = Image.open(imagepath)
# 识别验证码图片
result = IdentifyAPI(img)
# 返回识别结果(百度网盘为数字验证码)
return result

这个IdentifyAPI未定义?

淘宝登陆成功后日志显示失败

淘宝登陆成功后日志显示Fail to login, qrcode has expired...而且有个问题想咨询下,如果我想爬虫,该如何接管登陆后的淘宝

大佬是怎么获得这些api的啊

比如说bilibili,我在研究登录接口的时候都会弹出极验,没有出现过图像验证码,所以一直找不到一种比较好的方法(selenium太慢,然后极验的js逆向太复杂了)

SyntaxError: 缺少标识符

`File "C:\Users\win10\Desktop\tump\automation_learning_class.py", line 1143, in
infos_return, session = lg.zhihu('巴拉巴拉', '巴拉巴拉', 'pc')

File "H:\ad\lib\site-packages\DecryptLogin\platforms\zhihu.py", line 542, in login
data = js.call('encrypt', urlencode(data))

File "H:\ad\lib\site-packages\execjs_abstract_runtime_context.py", line 37, in call
return self._call(name, *args)

File "H:\ad\lib\site-packages\execjs_external_runtime.py", line 92, in _call
return self._eval("{identifier}.apply(this, {args})".format(identifier=identifier, args=args))

File "H:\ad\lib\site-packages\execjs_external_runtime.py", line 78, in eval
return self.exec
(code)

File "H:\ad\lib\site-packages\execjs_abstract_runtime_context.py", line 18, in exec_
return self.exec(source)

File "H:\ad\lib\site-packages\execjs_external_runtime.py", line 88, in exec
return self._extract_result(output)

File "H:\ad\lib\site-packages\execjs_external_runtime.py", line 167, in _extract_result
raise ProgramError(value)

ProgramError: SyntaxError: 缺少标识符`

原code:
from DecryptLogin import login

lg = login.Login()
infos_return, session = lg.zhihu('巴拉巴拉', '巴拉巴拉', 'pc')

大佬好!尝试登陆zhihu的时候出现以上报错,google了一下JS,对JS真的一窍不通,望大佬稍稍提点~

微博监控,首次运行只获得首页的前十条作为weibo_ids的池子而不是所有微博是吗?

微博监控,首次运行只获得首页的前十条作为weibo_ids的池子而不是所有微博是吗?
在下面首次获取cards的时候我做了一次打印只有10条
def __monitor(self, user_id, profile_url): user_name, containerid = self.__getContainerid(user_id, profile_url) res = self.session.get(self.api_url.format(user_id, user_id, containerid)) weibo_ids = [] cards = res.json()['data']['cards'] print('num:',len(cards)) for card in cards: if card['card_type'] == 9: weibo_ids.append(str(card['mblog']['id'])) while True: weibo_ids = self.__checkUpdate(user_id, profile_url, weibo_ids) time.sleep(self.time_interval)

豆瓣登录问题

尝试自行编写代码模拟登录豆瓣:

import requests

login_url = 'https://accounts.douban.com/j/mobile/login/basic'
headers = {
    'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.116 Safari/537.36',
    'Host': 'accounts.douban.com',
    'Origin': 'https://accounts.douban.com',
    'Referer': 'https://accounts.douban.com/passport/login?source=movie'}
data = {'ck': '',
        'name': 'xxxx',
        'password': 'xxxx',
        'remember': 'true',
        'ticket': ''}
r = requests.post(login_url, data=data, headers=headers)
print(r.text)

得到的结果却是:
{"status":"failed","message":"parameter_missing","description":"参数缺失","payload":{}}
不知是什么原因?新手看源码懵懵的。。

No module named 'requests_toolbelt'

你好,我在mac尝试from DecryptLogin import login,但得到的却是“No module named 'requests_toolbelt'”。知道为什么吗

b站下载up主视频

DecryptLogin/examples/bilibiliDownloadUserVideos/downloadUserVideos.py /

这个文件里面username 是填b站的哪个username?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.