Update README

This commit is contained in:
Klaus-Uwe Mitterer 2016-02-07 22:16:14 +01:00
parent 4766b891ff
commit e95c51f832

67
README
View file

@ -4,39 +4,43 @@ by Klaus-Uwe Mitterer <pokemon@klaus-uwe.me>
== Prerequisites ==
This script requires the modules urllib, cookielib, urllib2, signal, time and BeautifulSoup. You should be able to install those using pip if you don't have them anyway, but I'm not going to give detailed installation instructions.
You will need the following package installed before running Pokemon:
- BeautifulSoup
You should be able to install it using pip.
== Setup ==
Before you can get started, you have to change two settings in pokemon.py (lines 13-14):
Run setup.py in a console and enter your Facebook credentials.
--------------------------
email = "something"
password = "something"
cd $PATH_TO_POKEMON
./setup.py
--------------------------
In those two lines, replace "something" with your email address and password, respectively. Make sure not to break any indentation as this will prevent the script from working.
If your password contains special characters, specifically double quotes (") or backslashes (\), you will have to escape it. For details, check out the Troubleshooting section below.
(Replace $PATH_TO_POKEMON with the actual path, of course.)
== Running the script ==
If you have changed the settings as intended, you should be ready to go. Simply run the script by double-clicking it in your GUI or through your console like so:
If you have changed the settings as intended, you should be ready to go.
Simply run the script by double-clicking it in your GUI or through your
console like so:
--------------------------
cd PATH_TO_POKEMON
cd $PATH_TO_POKEMON
./pokemon.py
--------------------------
Obviously, replace PATH_TO_POKEMON with the actual path in your file system where you put pokemon.py.
If you provided the correct email address and password, you should now receive the following output:
If you provided the correct email address and password to setup.py, you should
now receive the following output:
--------------------------
Login successful!
--------------------------
Then, each time the script actually pokes somebody, it will notify you of this with the following output:
Then, each time the script actually pokes somebody, it will notify you of this
with the following output:
--------------------------
Poke!
@ -44,27 +48,29 @@ Poke!
== Stopping the script ==
In order to stop the script, simply issue a Ctrl+C in the terminal it is running in, or close the respective window.
In order to stop the script, simply issue a Ctrl+C in the terminal it is
running in, or close the respective window.
== Tweaking ==
== Nuclear Poke Bot ==
By default, the script will check for new inbound pokes every 30 seconds. You can modify this in the last line (line 66). Please note that a higher refresh/poke rate may cause the bot to run into a rate limit.
You may also turn the script into what I call a "Nuclear Poke Bot". By commenting out (putting a # in front of it) or deleting line 62 (if not "suggestion" in url:), you can cause it to not only poke back people who poked you, but also poke people Facebook suggests you to poke - over time, it will poke all your friends.
You may turn the script into what I call a "Nuclear Poke Bot". By commenting out
(putting a # in front of it) or deleting line 93 (if not "suggestion" in url:)
in pokemon.py, you can cause it to not only poke back people who poked you, but
also poke people Facebook suggests you to poke - over time, it will poke all
of your friends.
== Troubleshooting ==
If you have trouble signing in, chances are that you simply got a typo in your email address or password. Please double check.
If you have trouble signing in, chances are that you simply got a typo in your
email address or password. Please try removing config.cfg and running setup.py
again.
In case you have double quotes (") or backslashes (\) in your password, you will need to escape them, i.e. put a backslash (\) in front of them. For instance, if your password were to be Fo0\6ar" you would have to use the following password line:
If you still can't get the script running, chances are that Facebook changed
something on their end. Please send an email to <pokemon@klaus-uwe.me> and I'll
try to help you.
--------------------------
password = "Fo0\\6ar\""
--------------------------
If despite all this, you can not get the script running, chances are that Facebook changed something on their end. Please send an email to <pokemon@klaus-uwe.me> and I'll try to help you.
There are several reasons why the script may suddenly stop working. Most of the time you will just need to take a little break and try again later.
There are several reasons why the script may suddenly stop working. Most of the
time you will just need to take a little break and try again later.
If you keep getting messages like this:
@ -72,7 +78,10 @@ If you keep getting messages like this:
Poke timed out.
--------------------------
Chances are that your Internet connection is slow. This message is just a notice - no changes on your end should be necessary. You may, however, try to increase the script's waiting time at line 67 (time = 10). Values like 15 or 20 (seconds) will still be sensible and may reduce the number of messages.
Chances are that your Internet connection is slow. This message is just a notice
and no changes on your end should be necessary.
Generally, the script should recover from most problems automatically. If it ends up stalling anyway, you will have to kill it manually with Ctrl+C. But really, this shouldn't happen.
Generally, the script should recover from most problems automatically. If it
ends up stalling anyway, you will have to kill it manually with Ctrl+C.
But really, that shouldn't happen.