Code Monkey home page Code Monkey logo

whatsapp-scraping's Introduction

💬 WhatsApp-Scraping

Python script to get WhatsApp information from WhatsApp Web

Requirements

All the libraries that we are going to use are in the requirements.txt file. You can install it with PIP in the terminal with:

sudo pip install -r requirements.txt

In order to make this project work you need to have a profile in your browser where you already scanned the QR with your account then we are going to use that account for launching the Selenium driver.

Selenium

Selenium requires a driver to interface with the chosen browser. Firefox, for example, requires geckodriver, which needs to be installed before the below examples can be run. Make sure it’s in your PATH, e. g., place it in /usr/bin or /usr/local/bin.

Failure to observe this step will give you an error selenium.common.exceptions.WebDriverException: Message: ‘geckodriver’ executable needs to be in PATH.

Other supported browsers will have their own drivers available. Links to some of the more popular browser drivers follow.

For more information you can go to the Selenium Website at the installation section.

Settings

AT THIS MOMENT THE PROJECT ONLY WORKS WITH FIREFOX AND CHROME

Browser Profile FIREFOX_PATH

You need to setup your configuration in the settings.txt file. In this file you need to specify the profile of your browser where you already scan the QR whit your WhatsaApp account

For example we are using the default Firefox profile so we open Firefox and go to https://web.whatsapp.com/ then we scan our QR to login then we can close Firefox and go to search for our profile file that we have in /home/user/.mozilla/firefox/xxxxxxxx.default, now that we localized our file we add the direction to our settings.txt file in the FIREFOX_PATH

Browser Profile CHROME_PATH

For Chrome you can open Chrome browser, in the navigation bar you can go to chrome://version/ and copy the Profile path to set it in the settings.txt file in the BROWSER_PATH

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.