modrzew / pokeminer

Pokemon location scraper
MIT License
220 stars 62 forks source link

Facebook msg #245

Open Kobito123 opened 8 years ago

Kobito123 commented 8 years ago

hey, i added a facebook msg, who msg you if a rare pokemon spawns and where it its is. But somehow it stopped working . Any ideas ?

Code in db.py / def add_sighting(session, pokemon):

if obj.pokemon_id in [2,3,5,6,8,9,26,31,34,36,45,50,51,56,57,59,62,65,64,67,68,71,75,76,78,80,82,83,84,85,87,89,88,94,101,103,105,104,106,107,112,115,113,122,123,126,127,128,130,131,132,137,139,140,141,142,143,144,145,146,147,148,149,150,151]: client = fbchat.Client("sdfgsdf.sdg@gmx.de", "qwertz123") datestr = datetime.fromtimestamp(obj.expire_timestamp) dateoutput = datestr.strftime("%H:%M:%S") sent = client.send(100001986531748, "{} bis {}: http://maps.google.com/?q={}{}".format(pokemon_names[str(obj.pokemon_id)], dateoutput, obj.lat, obj.lon))

and at the top import fbchat

modrzew commented 8 years ago

My crystal glass exhausted its daily quota, sorry. Try tomorrow.

Now seriously, there are so many things that might have gone wrong with this code that I don't even want to think about it. Especially that you didn't provide any tracebacks or logs whatsoever.

Kobito123 commented 8 years ago

sry i am new to all of this :/ i mean everything works except the facebook msg . I dont get any errors . I just dont recieve msg from fb anymore

D:\Spiele\Pokemon GO\SERVER 1 -80bots>python worker.py --no-status-bar --log-level WARNING [%(asctime)s][%(threadName)10s][%(levelname)8s][L%(lineno)4d] %(message)s Traceback (most recent call last): File "worker.py", line 130, in run self.main() File "worker.py", line 172, in main cell_id=cell_ids File "d:\spiele\pokemon go\server 1 -80bots\src\pgoapi\pgoapi\pgoapi.py", line 137, in function return request.call() File "d:\spiele\pokemon go\server 1 -80bots\src\pgoapi\pgoapi\pgoapi.py", line 236, in call response = request.request(self._api_endpoint, self._req_method_list, self.get_position()) File "d:\spiele\pokemon go\server 1 -80bots\src\pgoapi\pgoapi\rpc_api.py", line 137, in request raise ServerSideRequestThrottlingException("Request throttled by server... slow down man") pgoapi.exceptions.ServerSideRequestThrottlingException: Request throttled by server... slow down man [%(asctime)s][%(threadName)10s][%(levelname)8s][L%(lineno)4d] %(message)s Traceback (most recent call last): File "worker.py", line 130, in run self.main() File "worker.py", line 172, in main cell_id=cell_ids File "d:\spiele\pokemon go\server 1 -80bots\src\pgoapi\pgoapi\pgoapi.py", line 137, in function return request.call() File "d:\spiele\pokemon go\server 1 -80bots\src\pgoapi\pgoapi\pgoapi.py", line 236, in call response = request.request(self._api_endpoint, self._req_method_list, self.get_position()) File "d:\spiele\pokemon go\server 1 -80bots\src\pgoapi\pgoapi\rpc_api.py", line 137, in request raise ServerSideRequestThrottlingException("Request throttled by server... slow down man") pgoapi.exceptions.ServerSideRequestThrottlingException: Request throttled by server... slow down man Logging in... [%(asctime)s][%(threadName)10s][%(levelname)8s][L%(lineno)4d] %(message)s Logging in...

Kobito123 commented 8 years ago

IS this what u needed ?

crhbetz commented 8 years ago

Dude, I don't want to be mean or anything, but you're probably copy-pasting something from somewhere into the code of this project, not having any idea what you're actually doing, and then asking the creator and contributors to make it work. This is just eating everyone's time for no use at all.

If you want to learn something, you can have a look at https://github.com/Noctem/pokeminer/tree/notification - there you can find a branch that added notification support through twitter and pushbullet that acutally integrates into Pokeminer and should work with recent upstream changes.

Kobito123 commented 8 years ago

hey, i just found out that fb 0.4.0 didnt install correctly using pip that was my only misstake. Didnt had anything to do with pokeminer. Mybad ty for the help thou innenseide and modrzew

amistad18 commented 8 years ago

Anyway, you're using wrong map for this purpose. Pokeminer main goal is to gathering data, and for example, I have ~120 accounts doing this job for my city. But on the side, I'm also running original PokemonGO-Map, with 6 accounts at 3 steps setting, to scan my neighborhood in radius of ~10 minutes walk. The reason is simple, pokeminer makes sure that I will gather all pokemon spawns, cause every area is checked once for almost 15 minutes. But if you want to actually catch those that interested you, you need to decrease full scan time, to make sure that you will get notification of new pokemon as soon as possible after it spawns. With 3 step radius, I have at least 12 minutes to go and catch it.

Kobito123 commented 8 years ago

Thats why I use two pokeminer one with 80 bots which scans my area, so that i have atleast 10 min to get everywhere with 26 points per cycle and one with 250 bots, which scans half of my down within 15 min with 72.5 points =) EDIT: Can't use the 250 bot miner anymore, because of the temporary ip bans :/

snicker commented 8 years ago

The correct way to go about this is to run a separate app that simply reads from the database, monitors for new rows, and sends an alert accordingly.

weizh888 commented 8 years ago

@amistad18 Before reading your comment, I found that this map's purpose is probably not to find the rare pokemons ASAP. In this case, you mentioned to PokemonGO-Map with 6 accounts, could you share a link about that one? Thanks a lot.

amistad18 commented 8 years ago

@weizh888 I meant the original one that pokeminer is based off - https://github.com/PokemonGoMap/PokemonGo-Map (the true original AHAAAAAAA/PokemonGo-Map was closed due to Niantic lawyers actions, and this newer one is continuing as a base).

Then for each account you run - `python runserver.py -a ptc -u username -p password -l "coordinates" -st 3 -k google-maps-api-key' You can increase -st, but with value 3 it makes the full scan to take ~3 minutes, and with -st 4, it takes ~6 minutes.