Skip to content

Commit

Permalink
Version 1.6.5.4
Browse files Browse the repository at this point in the history
apis/login : upgraded to eapi as weapi now needs captcha verification
apis : updated app version to 9.9.99
  • Loading branch information
mos9527 committed May 8, 2022
1 parent 54720ce commit 117f64f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions pyncm/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from .utils.crypto import RandomString, EapiEncrypt, EapiDecrypt, HexCompose
import requests, logging, json

__version__ = "1.6.5.3"
__version__ = "1.6.5.4"


class Session(requests.Session):
Expand All @@ -21,8 +21,8 @@ class Session(requests.Session):
UA_EAPI = "NeteaseMusic/7.2.24.1597753235(7002024);Dalvik/2.1.0 (Linux; U; Android 11; Pixel 2 XL Build/RP1A.200720.009)"
UA_LINUX_API = "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.90 Safari/537.36"
CONFIG_EAPI = {
"appver": "7.2.24",
"buildver": "7002024",
"appver": "9.9.99",
"buildver": "9009099",
"channel": "offical",
"deviceId": RandomString(8),
"mobilename": "Pixel2XL",
Expand Down
2 changes: 1 addition & 1 deletion pyncm/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -464,5 +464,5 @@ def report():

if __name__ == "__main__":
logger = getLogger()
basicConfig(level="INFO", format="[%(levelname).4s] %(message)s")
basicConfig(level="DEBUG", format="[%(levelname).4s] %(message)s")
sys.exit(__main__())
6 changes: 3 additions & 3 deletions pyncm/apis/login.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,15 +118,15 @@ def LoginViaCellphone(phone="", password="", ctcode=86, remeberLogin=True) -> di
Returns:
dict
"""
path = "/weapi/w/login/cellphone"
path = "/eapi/login/cellphone"
sess = GetCurrentSession()
passwordHash = HashHexDigest(password)
login_status = WeapiCryptoRequest(
login_status = EapiCryptoRequest(
lambda: (
path,
{
"phone": str(phone),
"checkToken": GenerateCheckToken(),
# "checkToken": GenerateCheckToken(),
"password": str(passwordHash),
"rememberLogin": str(remeberLogin).lower(),
"countrycode": str(ctcode),
Expand Down

0 comments on commit 117f64f

Please sign in to comment.