Giter Site home page Giter Site logo

yahavbahat / waze-police-scraper Goto Github PK

View Code? Open in Web Editor NEW
16.0 2.0 5.0 105 KB

Waze Police Scraper will scrape the police locations and display them in a map with the power of Selenium and Python, along with other information.

HTML 32.86% Python 67.14%
python python3 selenium flask waze waze-data

waze-police-scraper's Introduction

Waze-Police-Scraper

License_top

Waze Police Scraper will scrape the police locations and display them in map as pins. You'll be able to see more information about every cop vehicle/trap and also download the scraped data.

More in Features

Table of Contents

Requirements:

Prefferably not bad connection to avoid timeout.

Firefox browser installed.

Tested in Windows 10, Python 3.7.4 if you have any problems or notice any unwanted and bad behavior, please open an issue.

Installation:

For it to work, we need to use browser-mob-proxy, so:

pip install -r requirements.txt

and install browser-mob-proxy by going to here, and click download as zip.

Extract the archive and in Waze_Police_Scraper.py, in line 65, replace ... with the path of the executable browsermob-proxy in the folder bin

in the newly extracted folder, for example the path will be:

path_to_folder\\browsermob-proxy-2.1.4-bin\\browsermob-proxy-2.1.4\\bin\browsermob-proxy

Do not forget to replace every backslash \ with double-backslash \\.

If you downloded and extracted the folder in the downloads folder and you're on drive C:

C:\\Users\\your_name\\Downloads\\browsermob-proxy-2.1.4-bin\\browsermob-proxy-2.1.4\\bin\\browsermob-proxy

Download geckodriver for Selenium by going here here

and and in Waze_Police_Scraper.py, in line 74, replace ... with the path to the exe geckodriver file

Again, do not forget to replace every backslash \ with double-backslash \\.

That's it!

Now run Waze_Police_Scraper.py:

python3 App.py

Usage

Usage:

In the first input type 'a' or 'A' for Automatic scraping.

In the second choose how often do you want the program to scrape. (Numbers only (Integers))

Notice: The recommended value is 5 seconds,

but if you're scraping in other countries it will take time to get there with the mouse,

so prefferbly select 10 seconds.

That time is for the user to move to another location, to scrape police vehicles / Traps reported by Waze's users.

If you press Enter, without entering any number, the number will be the default, 5 seconds, which is also the recommended value.

After the Firebox browser launched and you're done scraping, just close the browser, and wait 5 seconds.

After that, go to localhost:5000 or 127.0.0.1:5000.

Features

Features:

If you go to localhost:5000,

In the map, by clicking on the pins you'll be able to see more information on them like coordinates,

type of police (vehicle or trap), speed, number of up votes by Waze's users, and confidence and reliability estimated by Waze.

Also, you can download the scraped data as JSON, XLS (Excel), and CSV by clicking on the buttons.


License:

License

waze-police-scraper's People

Contributors

yahavbahat avatar

Stargazers

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

Watchers

 avatar  avatar

waze-police-scraper's Issues

requirements.txt

Hello! Can you share with me the requirements.txt file?

Thanks!

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.