Giter VIP home page Giter VIP logo

jdbrandmember's Issues

feat: 希望可以支持直接调用入口

  • 目前是需要python main.py这样允许,然后选择运行。配置成定时任务来跑的话,没有入口。
  • 另外,线程数的配置希望可以给一个参考的建议,比如4c 8g可以配置多少个线程
  • 脚本是每天跑都有收益吗?还是需要间隔多长时间呢~希望可以给出一个参考的建议。

UnicodeDecodeError: 出现编码错误'gbk' codec can't decode byte ……

Traceback (most recent call last):
File "D:\python\JDBrandMember-21.05.30\main.py", line 261, in
CONFIG = yaml.safe_load(open(get_file_path("config.yaml"), "r"))
File "C:\Program Files\Python39\lib\site-packages\yaml_init_.py", line 162, in safe_load
return load(stream, SafeLoader)
File "C:\Program Files\Python39\lib\site-packages\yaml_init_.py", line 112, in load
loader = Loader(stream)
File "C:\Program Files\Python39\lib\site-packages\yaml\loader.py", line 34, in init
Reader.init(self, stream)
File "C:\Program Files\Python39\lib\site-packages\yaml\reader.py", line 85, in init
self.determine_encoding()
File "C:\Program Files\Python39\lib\site-packages\yaml\reader.py", line 124, in determine_encoding
self.update_raw()
File "C:\Program Files\Python39\lib\site-packages\yaml\reader.py", line 178, in update_raw
data = self.stream.read(size)
UnicodeDecodeError: 'gbk' codec can't decode byte 0x87 in position 157: illegal multibyte sequence
2021-05-31 04:08:49 INFO 执行结束

运行出错

运行出现以下错误,求教大佬如何解决,使用的平台是win10,Google Chrome 版本 90.0.4430.72(正式版本) (64 位),用的最新版京东入会有礼刷京豆0.3(附打包程序)
DevTools listening on ws://127.0.0.1:9254/devtools/browser/88214b30-de5f-4a44-be75-3ad51055359f
[14228:9528:0420/041210.575:ERROR:ssl_client_socket_impl.cc(947)] handshake failed; returned -1, SSL error code 1, net_error -101
[14228:9528:0420/041210.684:ERROR:ssl_client_socket_impl.cc(947)] handshake failed; returned -1, SSL error code 1, net_error -101
2021-04-20 04:12:15 INFO 登录成功 用户名:京豆数:
[14772:7852:0420/041216.733:ERROR:device_event_log_impl.cc(214)] [04:12:16.734] Bluetooth: bluetooth_adapter_winrt.cc:1072 Getting Default Adapter failed.
[15200:14480:0420/041404.804:ERROR:gpu_init.cc(426)] Passthrough is not supported, GL is disabled

有个小问题

用外国号注册的我的小号,程序显示入会成功并有豆入,但账号上没有豆增加,应该入会不成功,国内号码正常

两个功能应该加一下

1、是记忆功能,也就是上次跑到哪了,可提示是从头跑起还是接上次;
2、入会条件选择,比如小于多少京豆的就不加入

退出时,大量浏览器进程未退出

运行报错、想问下大佬这是什么原因

2021-05-17 17:32:54 INFO 结束运行 Traceback (most recent call last):
File "main.py", line 391, in
main()
File "main.py", line 343, in main
check_user()
File "main.py", line 317, in check_user
_browser.add_cookie(cookie)
File "D:\IDE\SDK\Python38\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 894, in add_cookie
self.execute(Command.ADD_COOKIE, {'cookie': cookie_dict})
File "D:\IDE\SDK\Python38\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "D:\IDE\SDK\Python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.InvalidArgumentException: Message: invalid argument: invalid 'expiry'
(Session info: headless chrome=79.0.3945.117)

程式運行時有顯示獲取京豆,但實際沒有增加

As title, 在程式運行時代碼顯示:

2021-06-01 15:50:28 INFO 账号名称: XXXXXX现有京豆数量: 749
账号:XXXXXX, 已尝试286个店铺,获得1071京豆和0元红包

但返回京東查看後,京豆依然是749,請問該如何解決?

Tks.

win10系统出错

win10系统,在chrome://version/中找不到64位的chrome版本

为什么会报错,用提3.8和3.95版64位的,难道要用32位的PYTHON吗?我等下用32位试下,不行再来反馈

2021-05-21 21:33:22 INFO 结束运行 Traceback (most recent call last):
File "C:\Users\Yang\Desktop\JDBrandMember-main\main.py", line 391, in
main()
File "C:\Users\Yang\Desktop\JDBrandMember-main\main.py", line 341, in main
add_cookie()
File "C:\Users\Yang\Desktop\JDBrandMember-main\main.py", line 102, in add_cookie
browser = get_browser(False)
File "C:\Users\Yang\Desktop\JDBrandMember-main\main.py", line 89, in get_browser
return webdriver.Chrome(executable_path=get_file_path("drivers/chromedriver"), desired_capabilities={},
File "C:\Users\Yang\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 73, in init
self.service.start()
File "C:\Users\Yang\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\common\service.py", line 72, in start
self.process = subprocess.Popen(cmd, env=self.env,
File "C:\Users\Yang\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 951, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Users\Yang\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 1420, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
OSError: [WinError 193] %1 不是有效的 Win32 应用程序。

进程异常卡住

设置了四个ck
当第一个尝试到10个店铺之后,进程就全部结束了py卡着了
尝试重启也无济于事
image

新版报错

原来的版本都很正常,新版出现如下错误,我是直接覆盖了原来的文件的,用的edge浏览器

image

大佬能不能看一下这是什么问题

File "E:\JD\main.py", line 89, in get_browser
return webdriver.Chrome(executable_path=get_file_path("drivers/chromedriver"), desired_capabilities={},
File "D:\python\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 76, in init
RemoteWebDriver.init(
File "D:\python\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 157, in init
self.start_session(capabilities, browser_profile)
File "D:\python\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 252, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "D:\python\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "D:\python\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: cannot find Chrome binary

一个提醒和一个问题

提醒:如何获取cookie的说明里你忘记把自己的号码打码了
问题:

用户注册时所填写的信息

register:
v_sex: 男 # 要求: 男 or 女
v_birthday: 2000-09-27 # 要求: yyyy-mm-dd
v_name: 康有为 # 要求: 1 - 10 个字符

我如果有多个pt_key pt_pin这个怎么搞,也多个吗,还是都用同一个

ubuntu 下无法运行

按照攻略执行到
python3 main.py后产生报错
Traceback (most recent call last):
File "/root/jd/ht/main.py", line 1, in
import ctypes
File "/usr/local/python3/lib/python3.9/ctypes/init.py", line 8, in
from _ctypes import Union, Structure, Array
ModuleNotFoundError: No module named '_ctypes'

已经按照百度安装了libffi-devel
python3 版本--Python 3.9.4
请问大神有解决的方法吗

termux终端可否实现跑脚本?

大神,你好

    想尝试在termux上跑这个脚本,但失败了,可能是没有安装或者说没有正确识别google driver有关。错误如下:

运行python3 main.py

Traceback (most recent call last):
File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/selenium/webdriver/common/service.py", line 72, in start
self.process = subprocess.Popen(cmd, env=self.env,
File "/data/data/com.termux/files/usr/lib/python3.9/subprocess.py", line 951, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "/data/data/com.termux/files/usr/lib/python3.9/subprocess.py", line 1821, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'drivers/chromedriver'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/data/data/com.termux/files/home/JDBrandMember/main.py", line 254, in
browser = getBrowser(headless=False)
File "/data/data/com.termux/files/home/JDBrandMember/main.py", line 224, in getBrowser
_browser = webdriver.Chrome(executable_path="drivers/chromedriver", options=chrome_options)
File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/selenium/webdriver/chrome/webdriver.py", line 73, in init
self.service.start()
File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/selenium/webdriver/common/service.py", line 81, in start
raise WebDriverException(
selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home

  因不便用电脑,想问下,有没有可能在终端里跑这个脚本,谢谢!

大佬这个是什么问题

File "main.py", line 380
shopID: list = open(get_file_path("shopid.txt"), "r").readlines()
^
SyntaxError: annotated name 'shopID' can't be global

报错:OSError: [WinError 193] %1 不是有效的 Win32 应用程序

2021-05-21 21:52:18 INFO 结束运行 Traceback (most recent call last):
File "C:\Users\Yang\Desktop\JDBrandMember-main\main.py", line 391, in
main()
File "C:\Users\Yang\Desktop\JDBrandMember-main\main.py", line 341, in main
add_cookie()
File "C:\Users\Yang\Desktop\JDBrandMember-main\main.py", line 102, in add_cookie
browser = get_browser(False)
File "C:\Users\Yang\Desktop\JDBrandMember-main\main.py", line 89, in get_browser
return webdriver.Chrome(executable_path=get_file_path("drivers/chromedriver"), desired_capabilities={},
File "C:\Users\Yang\AppData\Local\Programs\Python\Python39-32\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 73, in init
self.service.start()
File "C:\Users\Yang\AppData\Local\Programs\Python\Python39-32\lib\site-packages\selenium\webdriver\common\service.py", line 72, in start
self.process = subprocess.Popen(cmd, env=self.env,
File "C:\Users\Yang\AppData\Local\Programs\Python\Python39-32\lib\subprocess.py", line 951, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Users\Yang\AppData\Local\Programs\Python\Python39-32\lib\subprocess.py", line 1420, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
OSError: [WinError 193] %1 不是有效的 Win32 应用程序。

又来提建议了

首先感谢作者增加的1、入会条件 2、退出时进程的改进。

又有点想法了,如下:
1、增加已入会店铺签到功能( 获取积分或京豆);
2、增加参加店铺活动功能(如有抽奖);
3、增加多账号选择运行功能。

以上纯个建议,觉得如果光跑一个入会,这软件就会成为一次性软件了,因为退会麻烦。增加以上功能可能给本软件带来长久使用。

增加开卡速度config

开的太快估计黑号概率大
在哪行代码加sleep 能减少req速度啊 没找到 for req

目前发现的一些问题

  1. 有时显示入会成功,但查询的时候却并没有入会成功
  2. 显示的百分比忘记*100了
  3. 在国外的服务器上运时会报登录失败的错误

运行后出现乱码

扫码登录一段时间后,google chrome自动关闭,cmd出现乱码,cpu占用率达到了100%,请问是怎么回事?
捕获

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.