Skip to content

recognize and set proxyΒ #11

@kel50

Description

@kel50

I'm using this module behind a proxy and had to make some slight modifications for it to work.
So I'd suggest to check the environment for a proxy and set it in httplib2 using PySocks:

import httplib2
# detect presense of proxy and use env varibles if they exist
pi = httplib2.proxy_info_from_environment()
if pi:
    import socks
    socks.setdefaultproxy(pi.proxy_type, pi.proxy_host, pi.proxy_port)
    socks.wrapmodule(httplib2)  

source: https://stackoverflow.com/a/46206122

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions