我一直想在Yowsup上注册号码,但我遇到old_version
错误。
这是我的env_s40.py
文件:
from .env import YowsupEnv
import hashlib
class S40YowsupEnv(YowsupEnv):
_VERSION = "2.16.11"
_OS_NAME= "S40"
_OS_VERSION = "14.26"
_DEVICE_NAME = "302"
_MANUFACTURER = "Nokia"
_TOKEN_STRING = "PdA2DJyKoUrwLw1Bg6EIhzh502dF9noR9uFCllGk1478194306452"
_AXOLOTL = True
def getVersion(self):
return self.__class__._VERSION
def getOSName(self):
return self.__class__._OS_NAME
def getOSVersion(self):
return self.__class__._OS_VERSION
def getDeviceName(self):
return self.__class__._DEVICE_NAME
def getManufacturer(self):
return self.__class__._MANUFACTURER
def isAxolotlEnabled(self):
return self.__class__._AXOLOTL
def getToken(self, phoneNumber):
return hashlib.md5(self.__class__._TOKEN_STRING.format(phone = phoneNumber).encode()).hexdigest()
def getUserAgent(self):
return self.__class__._USERAGENT_STRING.format(
WHATSAPP_VERSION = self.getVersion(),
OS_NAME = self.getOSName() + "Version",
OS_VERSION = self.getOSVersion(),
DEVICE_NAME = self.getDeviceName(),
MANUFACTURER = self.getManufacturer()
)
我得到了
DEBUG:yowsup.env.env:Current env changed to s40
yowsup-cli v2.0.15
yowsup v2.5.0
Copyright (c) 2012-2016 Tarek Galal
http://www.openwhatsapp.org
This software is provided free of charge. Copying and redistribution is
encouraged.
If you appreciate this software and you would like to support future
development please consider donating:
http://openwhatsapp.org/yowsup/donate
DEBUG:yowsup.common.http.warequest:{'Accept': 'text/json', 'User-Agent': 'WhatsApp/2.16.7 S40Version/14.26 Device/Nokia-302'}
DEBUG:yowsup.common.http.warequest:cc=255&in=716343889&lc=GB&lg=en&sim_mcc=640&sim_mnc=002&mcc=640&mnc=002&method=sms&mistyped=6&network_radio_type=1&simnum=1&s=&copiedrc=1&hasinrc=1&rcmatch=1&pid=6444&rchash=5b9d791a39befe77a165a669cac86d3fa12c7390536885aa43555059748747e9&anhash=Q%90%1D%2Am%BA%EF%1C%8E%E1%84%94%E4%93%C6%DD%AB%B55E&extexist=1&extstate=1&token=fe234b378d154c6dcca365d264ed96cf&id=%A0%3B%2B%C3%B6%A2%F9%04%CB%FA%AE%887%7FY%F7E%E6%D3%17
DEBUG:yowsup.common.http.warequest:Opening connection to v.whatsapp.net
DEBUG:yowsup.common.http.warequest:Sending GET request to /v2/code?cc=255&in=716343889&lc=GB&lg=en&sim_mcc=640&sim_mnc=002&mcc=640&mnc=002&method=sms&mistyped=6&network_radio_type=1&simnum=1&s=&copiedrc=1&hasinrc=1&rcmatch=1&pid=6444&rchash=5b9d791a39befe77a165a669cac86d3fa12c7390536885aa43555059748747e9&anhash=Q%90%1D%2Am%BA%EF%1C%8E%E1%84%94%E4%93%C6%DD%AB%B55E&extexist=1&extstate=1&token=fe234b378d154c6dcca365d264ed96cf&id=%A0%3B%2B%C3%B6%A2%F9%04%CB%FA%AE%887%7FY%F7E%E6%D3%17
INFO:yowsup.common.http.warequest:{"login":"255716MYNUMBER","status":"fail","reason":"old_version"}
status: fail
reason: old_version
login: 255716MYNUMBER
我该如何解决?
答案 0 :(得分:0)
可能是一个糟糕的问题。
但是一个简短的谷歌给了:
https://github.com/tgalal/yowsup/issues/1861#issuecomment-264792842
还有其他关于类似问题的讨论。
答案 1 :(得分:-1)
env_android
文件中的将版本更改为最新版本(whatsapp):