Skip to main content

Luminati proxy done easy

Project description

import luminati as lm

session=lm.session(‘{username}’,’{password}’)

r=session.get(‘https://api.myip.com’)#returns usual request object

print(r.json())

>> {‘ip’: ‘89.185.77.245’, ‘country’: ‘Romania’, ‘cc’: ‘RO’}

#Every time uses different proxy

#Also chrome header is set by default to make your ban chances minimal

#but you still can parse from specific country if you want

session.get(‘https://api.myip.com’,cc=”ru”).text

>> {“ip”:”84.22.150.132”,”country”:”Russian Federation”,”cc”:”RU”}

#or set your own header

session.get(‘https://api.myip.com’,headers={“User-Agent”:”Mozilla/5.0 (compatible; MSIE 9.0; Windows Phone OS 7.5; Trident/5.0; IEMobile/9.0)”}).text

>> {“ip”:”178.173.228.210”,”country”:”Australia”,”cc”:”AU”}

#or timeout

session.get(‘https://api.myip.com’,timeout=10)

#TODO Change UserAgent every time just like it happens with countries of origin

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for luminati, version 0.1.36
Filename, size File type Python version Upload date Hashes
Filename, size luminati-0.1.36.tar.gz (6.2 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page