Skip to content
This repository was archived by the owner on Dec 15, 2018. It is now read-only.

Add proxy support - #66

Merged
globeriz merged 2 commits into
pogodevorg:masterfrom
Noctem:proxies
Aug 9, 2016
Merged

globeriz merged 2 commits into
pogodevorg:masterfrom
Noctem:proxies

Conversation

@Noctem

@Noctem Noctem commented Aug 9, 2016

Copy link
Copy Markdown
Contributor

Resolved the new conflicts.

@globeriz

globeriz commented Aug 9, 2016

Copy link
Copy Markdown
Contributor

changes consistent with #64, merging.

@globeriz globeriz closed this Aug 9, 2016
@globeriz globeriz reopened this Aug 9, 2016
@globeriz
globeriz merged commit 39ea20d into pogodevorg:master Aug 9, 2016
@Noctem

Noctem commented Aug 9, 2016

Copy link
Copy Markdown
Contributor Author

@globeriz Thanks, and yeah: I just force pushed the fixes to the same branch.

@oceanor

oceanor commented Aug 9, 2016

Copy link
Copy Markdown

thanks, great one :)
how does this works exactly? I've tried using
api = PGoApi()
api.set_proxy("socks5://address:port")

but still works on local with ip not banned and doesn't work on a banned ip. Seems that it's still using the non-proxy ip ^^
I've tested if proxy was correctly set adding a get_proxy(self) func and using it after each request, and it was

@AlicanGultekin

Copy link
Copy Markdown

I can confirm the issue above

@ottowayne

Copy link
Copy Markdown

I haven't tried it yet but did you update your pip requirements?

@ph3l1x

ph3l1x commented Aug 9, 2016

Copy link
Copy Markdown

How do I use this? Can I just bind to a specific IP on my machine? Is it something that needs added into the config file ?? Any chance of a quick write up on how to use this?

@Noctem

Noctem commented Aug 9, 2016

Copy link
Copy Markdown
Contributor Author

set_proxy expects a dict with http and https keys, like so:

PROXIES = {
    'http': 'socks5://127.0.0.1:1080',
    'https': 'socks5://127.0.0.1:1080'
}

api = PGoApi()
api.set_proxy(PROXIES)

More information available here.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Development

Successfully merging this pull request may close these issues.

7 participants