Perform a random number of Bing searches, with random search terms, waiting a random number of seconds between each search.
- Raspbian OS
- Browser: Chromium
- Packages:
jq, curl
In a terminal, run the following command in your desired directory:
curl -sSL https://raw.githubusercontent.com/tadms/bing_bot/master/bin/setup | bash
The bing_bot relies on your Chromium generated cookies to authenticate with Bing. The value of your Bing cookie request header gets passed to each cURL request. This value is not stored in clear text on the system. As a result, some manual steps are required.
-
On your Raspberry Pi, launch the GUI.
-
Launch the Chromium browser, and manually sign into https://www.bing.com.
-
Once you are successfully signed in, perform a bing search.
-
Ensure that reward points are added to your account successfully.
-
In Chromium, open the Developer Tools (F12) and select the Network tab.
-
Under the Network tab, select the Headers tab.
-
Refresh the page in Chromium.
-
This will create a long list of requests. Scroll to the top to find the first request, starting with
search?=
. -
Click on this request to display the HTTP headers.
-
Under Request Headers, copy the value for
cookie:
. -
Paste this value into
bing_bot/conf/cookie.txt
.
vim bing_bot/conf/cookie.txt
By default, the user agent is set to emulate the Microsoft Edge / Windows 10.
Mobile mode bing_bot -m
switches to a mobile (Android) user agent instead.
(Optional) Set up a cron job to run the bing_bot on a daily schedule.
crontab -e
0 2 * * * sleep $(shuf -i 1-3600 -n 1) && /home/pi/bing_bot/bin/bing_bot
0 12 * * * sleep $(shuf -i 1-3600 -n 1) && /home/pi/bing_bot/bin/bing_bot -m
- Note: The
sleep
command is used to randomize the start time.
The default configuration can be found in conf/default_conf.json
.
{
"min_seconds_between_searches": "15",
"max_seconds_between_searches": "60",
"min_amount_of_searches_to_run": "45",
"max_amount_of_searches_to_run": "60",
"log_file_path": "/var/log/bing_bot/bing_bot.log",
"random_words_repo": "https://raw.githubusercontent.com/tadms/random/master/words.json"
}
./bing_bot Start up the bing_bot with defaults
./bing_bot -c [config.json] Start up the bing_bot with custom config
./bing_bot -m Start up the bing_bot in mobile mode
./bing_bot -h Display this screen