Git Product home page Git Product logo

decryptlogin's Issues

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

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

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

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

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

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

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

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

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

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


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

登录Twitter报错

登录Twitter报错

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

豆瓣登录问题

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

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":{}}
不知是什么原因?新手看源码懵懵的。。

豆瓣无法登录

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

知乎手机号登录失败

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

12306的例子跑不起来

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

这个IdentifyAPI未定义?

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

报错内容如下:
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']

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

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

安装不了

你好想问一下啊我用 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.

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”

对于二维码的建议

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

b站下载up主视频

DecryptLogin/examples/bilibiliDownloadUserVideos/downloadUserVideos.py /

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

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

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

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

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

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

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

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

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

No module named 'requests_toolbelt'

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

网易云音乐报错

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

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

微博无法登陆了

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

知乎输入验证码失败

错误信息:
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: 缺少标识符

微博PC端登录失败

res_json的值为{'retcode': 0, 'msg': 'system error', 'exectime': 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)

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

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

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

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

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的报错

暂未解决

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

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

微博登录验证码输入问题

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

知乎需要手机验证码

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

微博监控,首次运行只获得首页的前十条作为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)

weibo监控的一个建议

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

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真的一窍不通,望大佬稍稍提点~

知乎登录报错

您好!,那段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)

微博 pc 端登录问题

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

知乎登陆错误

邮箱和密码是正确的,但是就是返回错误信息。是不是被知乎官方给屏蔽了?
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: 该邮箱尚未注册知乎

知乎登录报错

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

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.