import requests
user = 'tXXXXXX' # your t-number id (see Who Is Who, for example)
pwd = '********' # the password you created for non-standard internet access
session = requests.session()
session.proxies = {'http':'client proxy'
% (user,pwd), 'https':'client proxy' %
(user,pwd)}
resp = session.get('https://api.github.com')
print(resp.status_code)
I have tried to replicate this logic with the lseg-data package, but so far unsuccessfully:
my python code:
import lseg.data as ld
import os
os.environ['HTTPX_LOG_LEVEL'] = 'trace'
os.environ['HTTPCORE_LOG_LEVEL'] = 'trace'
os.environ['HTTP_PROXY']="client proxy"
os.environ['HTTPS_PROXY']="client proxy'
ld.open_session()
Config json file:
{
"sessions": {
"default": "platform.ldp",
"platform": {
"ldp": {
"app-key": My EDP API key",
"username": "my corporate user id for the external connection proxy",
"password": "my password for the proxy",
"signon_control": true
}
}
}
}
The error I'm getting is "LDError: Invalid port: THE_FIRST_4_LETTERS_OF_MY_PROXY_CODE"