I didn't have chromedriver installed initially - it caused a secondary exception.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/tcrha/.local/bin/deletefb", line 8, in <module>
sys.exit(run_delete())
File "/home/tcrha/.local/lib/python3.8/site-packages/deletefb/deletefb.py", line 112, in run_delete
driver = login(
File "/home/tcrha/.local/lib/python3.8/site-packages/deletefb/tools/login.py", line 44, in login
driver = setup_selenium(chrome_options, chrome_binary_path)
File "/home/tcrha/.local/lib/python3.8/site-packages/deletefb/tools/chrome_driver.py", line 66, in setup_selenium
except WebDriverException:
NameError: name 'WebDriverException' is not defined
* Report more exceptions
This makes it much easier to debug chrome errors.
Without reporting these errors things will silently fail.
* Ignore pyc files
* Don't pull chromedriver from cask
This currently only works for English language Facebook accounts, due to the lack of a usable API.
Also, year by year deletion is currently broken. Feel free to fork or make pull requests.
## Why?
I needed a simple and reliable way to delete Facebook posts. There are
@ -17,18 +21,47 @@ online presence and not have to worry about what you wrote from years ago.
Personally, I did this so I would feel less attached to my Facebook profile
(and hence feel the need to use it less).
## Dependencies
- This tool requires at least Python 3.7 in order to run.
- A recent copy of Chrome or Chromium installed and available in your `$PATH`
## Installation
You have several options to run it.
1) Install from PyPI with `pip3 install --user delete-facebook-posts` (recommended)
1) Install from PyPI with `pip3 install --user delete-facebook-posts` (recommended you do this in a virtualenv to avoid incompatibilities)
2) Clone this repo and run `pip3 install --user .` or do `pip3 install --user
git+https://github.com/weskerfoot/DeleteFB.git`
3) Set up a Python virtualenv, activate it, and run `pip3 install -r requirements.txt`, then you can just run `python -m deletefb.deletefb` in the DeleteFB directory.
4) Use the docker image (experimental) by running `make` after checking this repository out with git. There is also an image built and published automatically at `wjak56/deletefb:latest`
## Chromedriver
The tool will attempt to detect the version of Chrome that you have installed and download the appropriate chromedriver. It is possible that it might fail to find your chrome version if you are running on Windows. If that is the case, please try running the docker version.
The code generated by your 2FA device for Facebook
-H, --headless Run browser in headless mode (no gui)
--no-archive Turn off archiving (on by default)
-Y YEAR, --year YEAR The year(s) you want posts deleted.
-B CHROMEBIN, --chromebin CHROMEBIN
Optional path to the Google Chrome (or Chromium) binary
```
* Make sure that you have a recent version of Python 3.x installed (preferably
3.6 or greater)
3.7 or greater)
* Make sure that you have Google Chrome installed and that it is up to date
* The tool will attempt to automatically install chromedriver for Selenium. See [here](https://sites.google.com/a/chromium.org/chromedriver/home) for an explanation of what the chromedriver does. You may have to manually install it if auto-install fails.
* On Linux, it will be called something like `chromium-chromedriver` or just