modrzew / pokeminer

Pokemon location scraper
MIT License
220 stars 62 forks source link

Help Preventing Softbans for Scanners? #246

Open runmorereadmore opened 8 years ago

runmorereadmore commented 8 years ago

I have been running Pokeminer since it was released and I love it. It makes the game much more exciting and I want to make sure I can use it as long as it's available.

I'm running around 18 accounts to scan my area. Today I got my first set of soft-bans as my PTC scanning accounts were locked out for a few hours.

I'm not an expert, obviously >.> but in order to prevent these IP bans I should likely be using either a Proxy or a VPN. I couldn't find any VPN's that seemed suitable for this as I wanted to test this first before I invested any money. I've browsed around looking at proxies and I just want to make sure I did everything correctly because I still get all my workers killed after this.

First, I went online and found some free proxies and put them in the config file as:

PROXIES = {'http': 'socks5:// _IP_ : _PORT_' , 'https': 'socks5:// _IP_ : _PORT_' }

Then I ran:

pip install pysocks

After this I got some errors but I found I needed to add two imports to the config and ran one more pip:

import win_inet_pton import requests and

pip install win-inet-pton

Everything seems to be working fine (meaning no errors), except my workers still all get killed when this runs for more than 20 minutes. Should this protect me from IP Bans or did I miss something?

I'm the first one to admit I don't really know what I'm talking about so any suggestions would be greatly appreciated.

modrzew commented 8 years ago

Occassional kills are normal (ekhm), I mean that worker gets killed if it doesn't find anything for 5 minutes. It may be lack of spawns (then you might try disabling it using most recent code from master). But if it's the same worker being killed over and over, that may indicate a ban.

runmorereadmore commented 8 years ago

It's all 18 getting banned at once.

It's definitely not lack of spawns. I get around 500 spawns an hour. Should I just make new accounts?

gunawanputra commented 8 years ago

put import win_inet_pton in pgoapi.py, not in config.py

nhumber commented 8 years ago

slightly off topic but with the "banning" they are doing it would be nice to see your workers rotate positions every 3 cycles or something, so eventually they all move around slightly, might not look as weird as scanning the same 30 or 40 points day in and day out also. AND it'll be nice to not loose ALL the data/new spawns from a certain worker if something happens to it( spread it out over the whole map)

gunawanputra commented 8 years ago

@nhumber Right now Im trying to create poxy switcher function I talked in #217 with banned detection I put in PR #249. If a proxy switch can't resolve worker banned status (account get permanent banned, status_code 3), banned worker will terminated.

If one or more workers terminated, your idea about spread (working) workers over the whole map to not loose ALL the data/new spawns can be accomplished by retrieve a new set of points with availabe workers, so each of working workers will get a new set of points that covering terminated worker points. But to do this we need to change how points is retrieve and assign to each worker.