Skip to content

Commit

Permalink
updata
Browse files Browse the repository at this point in the history
  • Loading branch information
yourChainGod committed Aug 27, 2024
1 parent fc3739e commit f7d4780
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions nebx/nebx.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@


class Twitter:
def __init__(self, auth_token):
def __init__(self, auth_token, proxy):
self.auth_token = auth_token
bearer_token = "Bearer AAAAAAAAAAAAAAAAAAAAANRILgAAAAAAnNwIzUejRCOuH5E6I8xnZz4puTs%3D1Zv7ttfk8LF81IUq16cHjhLTvJu4FA33AGWWjCpTnA"
defaulf_headers = {
Expand All @@ -25,7 +25,7 @@ def __init__(self, auth_token):
"authorization": bearer_token,
}
defaulf_cookies = {"auth_token": auth_token}
self.Twitter = AsyncSession(headers=defaulf_headers, cookies=defaulf_cookies, timeout=120)
self.Twitter = AsyncSession(headers=defaulf_headers, cookies=defaulf_cookies, timeout=120, proxy=proxy)
self.auth_code = None

async def get_auth_code(self, client_id, state, code_challenge):
Expand Down Expand Up @@ -113,7 +113,7 @@ def __init__(self, auth_token, inviteCode, nstproxy_Channel, nstproxy_Password):
session = ''.join(random.choices(string.digits + string.ascii_letters, k=10))
nstproxy = f"http://{nstproxy_Channel}-residential-country_ANY-r_5m-s_{session}:{nstproxy_Password}@gw-us.nstproxy.com:24125"
self.client = AsyncSession(timeout=120, headers=headers, impersonate="chrome120", proxy=nstproxy)
self.Twitter = Twitter(auth_token)
self.Twitter = Twitter(auth_token, proxy=nstproxy)
self.auth_token, self.inviteCode = auth_token, inviteCode

def encode(self, info):
Expand Down

0 comments on commit f7d4780

Please sign in to comment.