Giter Club home page Giter Club logo

bird-whisperer's Introduction

Bird Whisperer

This is a simple script that repeatedly rings the alarm of up to the 250 bird scooter that are closest to the given location. This work is inspired by the work of The App Analyst.

It uses Mailnesia to generate accounts with random email on the fly everytime you start the script.

Update Oct 10, 2019

Bird seems to have taken actions to prevent this from working. I now get a 412 Precontition failed whenever I try to make a bird chirp, from two different IP addresses. Please try and tell me if it still works for you.

Update Nov 5, 2019

The birds seem to be chirping again

Disclaimer

To the best of my knowledge, there is no rate limiting whatsoever on the Bird API. However, Bird's terms of service state the following :

You agree that you will not use any robot, spider, scraper or other automated means to access the Services for any purpose without our express written permission. Additionally, you agree that you will not: (i) take any action that imposes, or may impose in our sole discretion an unreasonable or disproportionately large load on our infrastructure; (ii) interfere or attempt to interfere with the proper working of the site or any activities conducted on the Services; or (iii) bypass any measures we may use to prevent or restrict access to the Services.

How to use

First, run pip3 install -r requirements.txt

Then you are good to go.

$ python3 bird.py -h
usage: bird.py [-h] [-a ADDRESS] [--autopick-address] [-n RINGS] [-t THREADS]
               [-r RADIUS]

Bird API client library. Calling this file directly causes all birds aroud
given location to chirp

optional arguments:
  -h, --help            show this help message and exit
  -a ADDRESS, --address ADDRESS
                        Search for address on OSM and use fetched GPS
                        coordinates
  --autopick-address    If set, automatically picks the first search result
  -n RINGS, --rings RINGS
                        How many times to loop over the birds
  -t THREADS, --threads THREADS
                        How many threads to use
  -r RADIUS, --radius RADIUS
                        Radius around given position in which to ring birds

Master of birds mode

The webserver.py script allows to remotely trigger the alarms from URL parameters. Run the following command on an internet facing server FLASK_APP=webserver.py python3 -m flask run --host=0.0.0.0 --port=8000. You will now be able to query http[s]://{your.hostname}:8000/ring/{latitude}/{longitude}/{radius}

The droid.py script is meant to be run on an Android phone with QPython3. You must first install edit the HOST and PORT variables to match the public hostname of your server as well as your chosen port. Then, install the requests module via the pip3 installer in QPython3 and make sure the SL4A service is running (from the "three dots" menu in the upper right corner of the app). When this is done, run the script from the "Programs" menu. It will continuously fetch your GPS location and ring the alarm of nearby birds as you move around the city by querying the flask server on every location update.

This was put together in a very short time and you might need to start a bogus trip on Google maps to make your phone update your location using GPS more often. When I do not do this, 80% of my location updates are made using network instead of GPS.

Credits

https://theappanalyst.com/bird.html

bird-whisperer's People

Contributors

pcouy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

bird-whisperer's Issues

Update to write up

Hey pcouy,

Cool work! Would you mind if I link it and attribute it to you in the Bird write up update? If you're comfortable I'd like to ask some questions could you email me at [email protected], thanks!

Cheers,
The App Analyst

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.