
- Webscraper out of selenium for mac#
- Webscraper out of selenium install#
- Webscraper out of selenium driver#
- Webscraper out of selenium code#
- Webscraper out of selenium windows#
Webscraper out of selenium driver#
The filepath where to find the chrome driver that selenium will use.In our case, we’re going to define three properties:

We first need to think about what configurable properties we’d like to allow the user to change.
Webscraper out of selenium code#

For large chats, I recommend turning your PC’s sleep/power settings to OFF and running the script in the evening or before bed so it loads over night. If you load more than the current record let me know and add yourself to the leader board.ĭepends on the chat size and how performant your computer is, however below is a ballpark range to expect. For reference, my largest chat (~50k messages) uses about 10GB of RAM. The most demanding part of the process is loading the entire chat in the browser, in which performance heavily depends on how much memory your computer has and how well Chrome handles the large DOM load. Follow these instructions to grant chromedriver an exception, then re-run the script.
Webscraper out of selenium for mac#
Note for Mac users: you may get blocked when trying to run the script the first time with a message about chromedriver not being from an identified developer. env file with an entry for DRIVER_PATH and CHROME_PROFILE that specify the directory paths for your ChromeDriver and your Chrome Profile from above steps: # WindowsĭRIVER_PATH = 'C:\path-to-your-driver\chromedriver.exe'ĬHROME_PROFILE = 'C:\Users\your-username\AppData\Local\Google\Chrome\User Data'ĭRIVER_PATH = '/Users/your-username/path-to-your-driver/chromedriver'ĬHROME_PROFILE = '/Users/your-username/Library/Application Support/Google/Chrome/Default' Get your Chrome browser Profile Path by opening Chrome and entering chrome://version into the URL barĬreate an.
Webscraper out of selenium install#
Python3 -m pip install -r requirements.txtĭownload ChromeDriver and extract it to a local folder (such as the env folder)
Webscraper out of selenium windows#
You can change it back afterwards, but for now the script relies on certain HTML elements/attributes that contain English characters/words.Īctivate the virtual environment: # Windows

This needs to be done on your phone (instructions here). Make sure your WhatsApp chat settings are set to English language.

WhatSoup solves these problems by loading the entire chat history in a browser, scraping the chat messages (only text, no media), and exporting it to.
