Skip to main content

Python library to parse proxy auto-config (PAC) files.

Project description

pygopac

Python library to parse proxy auto-config (PAC) files.

Example

import requests

import gopac

pac_path = gopac.download_pac_file(
    'https://antizapret.prostovpn.org/proxy.pac'
)
proxy = gopac.find_proxy(pac_path, 'https://www.linkedin.com')
response = requests.get('https://www.linkedin.com', proxies=proxy)
print(response.text)
import requests

import gopac

proxy = gopac.find_proxy(
    'https://antizapret.prostovpn.org/proxy.pac', 'https://www.linkedin.com'
)
response = requests.get('https://www.linkedin.com', proxies=proxy)
print(response.text)

Project details


Download files

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

Source Distribution

pygopac-0.1.0.tar.gz (3.6 kB view hashes)

Uploaded Source

Built Distribution

pygopac-0.1.0-py3-none-macosx_10_10_x86_64.whl (5.7 MB view hashes)

Uploaded Python 3 macOS 10.10+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page