GithubHelp home page GithubHelp logo

jdbuyer's Issues

查询库存显示异常

ERROR: ('查询 %s 库存信息发生异常, resp: %s, exception: %s', '10033592167263', 'jQuery6485269({})', AttributeError("'NoneType' object has no attribute 'get'"))

Bug Report

image
Python 3.9.11运行时寄了
image
这理论上应该要匹配才对&&为啥作者大大能直接正常生成出运行文件orz

抢购不会以最低的价格

目前有一些产品需要使用系统带的优惠卷,会便宜很多钱。

目前不会自动使用优惠卷,只是使用商品默认价格进行抢购。

无法登陆账号

扫码后仍显示“请使用京东扫码登录”,而不是库存刷新时间及结果

命令行模式报错

具体错误内容如下

Traceback (most recent call last):
  File "D:\Python\lib\site-packages\urllib3\connectionpool.py", line 696, in urlopen
    self._prepare_proxy(conn)
  File "D:\Python\lib\site-packages\urllib3\connectionpool.py", line 964, in _prepare_proxy
    conn.connect()
  File "D:\Python\lib\site-packages\urllib3\connection.py", line 359, in connect
    conn = self._connect_tls_proxy(hostname, conn)
  File "D:\Python\lib\site-packages\urllib3\connection.py", line 496, in _connect_tls_proxy
    return ssl_wrap_socket(
  File "D:\Python\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 "D:\Python\lib\site-packages\urllib3\util\ssl_.py", line 474, in _ssl_wrap_socket_impl
    return ssl_context.wrap_socket(sock)
  File "D:\Python\lib\ssl.py", line 500, in wrap_socket
    return self.sslsocket_class._create(
  File "D:\Python\lib\ssl.py", line 1040, in _create
    self.do_handshake()
  File "D:\Python\lib\ssl.py", line 1309, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:1123)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\Python\lib\site-packages\requests\adapters.py", line 489, in send
    resp = conn.urlopen(
  File "D:\Python\lib\site-packages\urllib3\connectionpool.py", line 755, in urlopen
    retries = retries.increment(
  File "D:\Python\lib\site-packages\urllib3\util\retry.py", line 573, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='qr.m.jd.com', port=443): Max retries exceeded with url: /show?appid=133&size=147&t=1671777008328 (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1123)')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\下载\JdBuyer-main\JdBuyer.py", line 114, in <module>
    buyer.loginByQrCode()
  File "D:\下载\JdBuyer-main\JdBuyer.py", line 36, in loginByQrCode
    qrCode = self.session.getQRcode()
  File "D:\下载\JdBuyer-main\JdSession.py", line 100, in getQRcode
    resp = self.sess.get(url=url, headers=headers, params=payload)
  File "D:\Python\lib\site-packages\requests\sessions.py", line 600, in get
    return self.request("GET", url, **kwargs)
  File "D:\Python\lib\site-packages\requests\sessions.py", line 587, in request
    resp = self.send(prep, **send_kwargs)
  File "D:\Python\lib\site-packages\requests\sessions.py", line 701, in send
    r = adapter.send(request, **kwargs)
  File "D:\Python\lib\site-packages\requests\adapters.py", line 563, in send
    raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='qr.m.jd.com', port=443): Max retries exceeded with url: /show?appid=133&size=147&t=1671777008328 (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1123)')))

image
image
image

感谢大佬,拿你的代码魔改了一点点,抢到了4080公版。

主要优化了扫码那个配置,默认的我二维码我扫了总登录不上,我改了一下格式从png改成了jpg,然后加了白色边框,就可以扫码了。
定时器那个用的第三方包,写的那个while循环定时器感觉不太好用。
然后加入了停止时间配置。
目前只有命令行版,没有弄界面,有需要的,可以说一声,等我有空了再弄。
https://github.com/Tlntin/JdBuyer

登录成功后报错

Traceback (most recent call last):
File "C:\Program Files\Python39\lib\site-packages\requests\models.py", line 972, in json
return complexjson.loads(self.text, **kwargs)
File "C:\Program Files\Python39\lib\json_init_.py", line 346, in loads
return _default_decoder.decode(s)
File "C:\Program Files\Python39\lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "C:\Program Files\Python39\lib\json\decoder.py", line 353, in raw_decode
obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 1 column 2 (char 1)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "E:\Learn\JDBuyBuy\JdBuyer_KangYuan_JiuAn\JdBuyer.py", line 115, in
buyer.buyItemInStock(skuId, areaId, skuNum, stockInterval,
File "E:\Learn\JDBuyBuy\JdBuyer_KangYuan_JiuAn\JdBuyer.py", line 75, in buyItemInStock
self.session.fetchItemDetail(skuId)
File "E:\Learn\JDBuyBuy\JdBuyer_KangYuan_JiuAn\JdSession.py", line 169, in fetchItemDetail
resp = self.getItemDetail(skuId).json()
File "C:\Program Files\Python39\lib\site-packages\requests\models.py", line 976, in json
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Expecting property name enclosed in double quotes: line 1 column 2 (char 1)

Bug

GUI无法显示登录界面

ERROR: 购物车取消勾选失败

2022-12-16 14:21:23,154 INFO: 100043960941 满足下单条件,开始执行
2022-12-16 14:21:23,202 ERROR: 购物车取消勾选失败

清空购物车显示成功实际上并没有清空

清空购物车显示成功实际上并没有清空,会导致如果这次提交订单没有成功的话,下次再检测到有货的话,下次再加一次购物车就是两件商品一起下单了,麻烦您看一下

requests.exceptions.JSONDecodeError: Expecting property name enclosed in double quotes: line 1 column 2 (char 1)

PS D:\workplace\JdBuyer-main> python JdBuyer.py
2022-10-30 18:14:12,605 INFO: 登录成功
Traceback (most recent call last):
File "D:\javaDev\PythonDev\lib\site-packages\requests\models.py", line 972, in json
return complexjson.loads(self.text, **kwargs)
File "D:\javaDev\PythonDev\lib\json_init_.py", line 357, in loads
return _default_decoder.decode(s)
File "D:\javaDev\PythonDev\lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "D:\javaDev\PythonDev\lib\json\decoder.py", line 353, in raw_decode
obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 1 column 2 (char 1)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "JdBuyer.py", line 115, in
buyer.buyItemInStock(skuId, areaId, skuNum, stockInterval,
File "JdBuyer.py", line 75, in buyItemInStock
self.session.fetchItemDetail(skuId)
File "D:\workplace\JdBuyer-main\JdSession.py", line 169, in fetchItemDetail
resp = self.getItemDetail(skuId).json()
File "D:\javaDev\PythonDev\lib\site-packages\requests\models.py", line 976, in json
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Expecting property name enclosed in double quotes: line 1 column 2 (char 1)

点击开始无反应

image
这里不管是使用默认sku和areaId,还是自己配置的数据,点击开始都无反应。win10环境下

请求不了登录二维码

requests.exceptions.ProxyError: HTTPSConnectionPool(host='qr.m.jd.com', port=443): Max retries exceeded with url: /show?appid=133&size=147&t=1672369101367 (Caused by ProxyError('Cannot conn
ect to proxy.', OSError(0, 'Error')))

说是请求次数频繁?

[suggestion] 推送登录二维码到 Server 酱进行状态保活

首先,伸手党非常感谢作者开源这个项目,也是一样准备抢台富士相机
关于登录状态的问题,以前玩过京东 web 端相关的API,很长时间,京东 web 的 session 可以维持很久,可以用于领取一些奖励或者保价。后来京东那边做了技术调整,京东 web 的 session 基本 24 小时不到就会失效,需要频繁登录的监听程序直接废了

我这边有一个想法,碍于对 Python 不熟悉,无法发起 PR,能否在 testSession false 的时候,重新获取登录二维码,并且通过某些推送渠道,将二维码图片通知给监听的人,然后实现手工再登录,完成变相的保活。

以上。

不能用了吧?

F:\jd\JdBuyer-main>python JdBuyer.py
2022-12-15 22:35:39,021 INFO: 登录成功
Traceback (most recent call last):
File "F:\jd\JdBuyer-main\JdBuyer.py", line 115, in
buyer.buyItemInStock(skuId, areaId, skuNum, stockInterval,
File "F:\jd\JdBuyer-main\JdBuyer.py", line 75, in buyItemInStock
self.session.fetchItemDetail(skuId)
File "F:\jd\JdBuyer-main\JdSession.py", line 169, in fetchItemDetail
resp = self.getItemDetail(skuId).json()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\YanYonghang\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\models.py", line 898, in json
return complexjson.loads(self.text, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\YanYonghang\AppData\Local\Programs\Python\Python311\Lib\json_init_.py", line 346, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\YanYonghang\AppData\Local\Programs\Python\Python311\Lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\YanYonghang\AppData\Local\Programs\Python\Python311\Lib\json\decoder.py", line 353, in raw_decode
obj, end = self.scan_once(s, idx)
^^^^^^^^^^^^^^^^^^^^^^
json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 1 column 2 (char 1)

正常运行中突然报错,这个是啥情况

2022-12-15 09:03:16,482 INFO: 登录成功
Traceback (most recent call last):
File "C:\Users~\AppData\Local\Programs\Python\Python310\lib\site-packages\requests\models.py", line 971, in json
return complexjson.loads(self.text, **kwargs)
File "C:\Users~\AppData\Local\Programs\Python\Python310\lib\json_init_.py", line 346, in loads
return _default_decoder.decode(s)
File "C:\Users~\AppData\Local\Programs\Python\Python310\lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "C:\Users~\AppData\Local\Programs\Python\Python310\lib\json\decoder.py", line 353, in raw_decode
obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 1 column 2 (char 1)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\temp\JdBuyer-main\JdBuyer.py", line 115, in
buyer.buyItemInStock(skuId, areaId, skuNum, stockInterval,
File "C:\temp\JdBuyer-main\JdBuyer.py", line 76, in buyItemInStock
self.session.fetchItemDetail(skuId)
File "C:\temp\JdBuyer-main\JdSession.py", line 169, in fetchItemDetail
resp = self.getItemDetail(skuId).json()
File "C:\Users~\AppData\Local\Programs\Python\Python310\lib\site-packages\requests\models.py", line 975, in json
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Expecting property name enclosed in double quotes: line 1 column 2 (char 1)

尝试打印getItemDetail方法中调用京东接口的返回值,发现是{'code': 200,'limit': 1}

抢购无效

最近在抢iphone14,设置好定时抢购开始执行脚本,一直显示未满足抢购条件,到达抢购时间也是一样

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.