Code Monkey home page Code Monkey logo

autoxgp's People

Contributors

anerycoft avatar coderyn2019 avatar mc-cookies avatar tuffy163 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

autoxgp's Issues

无法购买xgp

签约支付宝后显示已订阅xgp但是没有扣款信息

设置代号后报错

C:\Users\Administrator\Desktop\AutoXGP-main>python AutoXGP.py
[16:28:16] 已设置Xbox玩家代号为:drdcohCJ0otRzCd
Exception in thread Thread-3 (assign_account):
Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1073, in _bootstrap_inner
self.run()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1010, in run
self._target(*self._args, **self._kwargs)
File "C:\Users\Administrator\Desktop\AutoXGP-main\AutoXGP.py", line 814, in assign_account
getXGP(account)
File "C:\Users\Administrator\Desktop\AutoXGP-main\AutoXGP.py", line 595, in getXGP
addressId = addresses.json()["id"]
~~~~~~~~~~~~~~~~^^^^^^
KeyError: 'id'

[Fix] 获取addressId出现错误

Reason:
因为微软账号没有设置姓名,导致请求addresses时报Bad Requests

Solutions:
①使用设置了姓名的微软账号

②在请求addresses之前请求设置姓名的profiles
Possible version:

    # 确认使用支付宝订阅
    url = f"https://paymentinstruments.mp.microsoft.com/v6.0/users/me/paymentInstrumentsEx/{payment_instrument_id}?language=zh-CHT&partner=webblends&country=hk&completePrerequisites=True"
    add_alipay = client.get(url=url, headers=headers)

    # ===========================================================================
    # setname
    url = "https://paymentinstruments.mp.microsoft.com/v6.0/users/me/profiles"
    body = {
	"profileType":"consumerprerequisites",
	"profileCountry":"hk",
	"profileOperation":"add",
	"type":"consumer",
	"first_name":"fix",
	"last_name":"fix",
	"email_address":ms_email,
	"culture":"EN"
    }
    setname = client.post(url=url, json=body, headers=headers)
    # ===========================================================================

    # 添加地址信息
    # url = "https://jcmsfd.account.microsoft.com/JarvisCM/me/addresses"
    url = "https://paymentinstruments.mp.microsoft.com/v6.0/users/me/addresses"
    body = {
        "addressCountry": "hk",
        "addressType": "billing",
        "address_line1": "b",
        "address_line2": "",
        "city": "a",
        "country": "hk"
    }
    addresses = client.post(url=url, json=body, headers=headers)

[BUG] 数组越界

卡在创建XBox档案session_id_match = re.search(r'sid=(.+?)&',login_in.history[2].headers["Location"])代码,
image

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.