Browse Source

Report more exceptions (#125)

* 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
pull/127/head
Michael Bianco 4 years ago
committed by GitHub
parent
commit
e8896b1a2c
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      .gitignore
  2. 3
      README.md
  3. 3
      deletefb/deletefb.py
  4. 3
      deletefb/tools/login.py
  5. 3
      deletefb/tools/wall.py

1
.gitignore

@ -1,5 +1,6 @@
.envrc
__pycache__
*.pyc
venv
deletefb.log
test.sh

3
README.md

@ -65,8 +65,7 @@ optional arguments:
* On MacOS, it will be available via brew, with the following commands:
```
brew tap homebrew/cask;
brew cask install chromedriver
brew install chromedriver
```
* Run `deletefb -E 'youremail@example.org' -P 'yourfacebookpassword' -U 'https://www.facebook.com/your.profile.url'`

3
deletefb/deletefb.py

@ -134,7 +134,8 @@ def run_delete():
else:
print("Please enter a valid mode")
sys.exit(1)
except:
except BaseException as e:
print(e)
if driver:
quit_driver_and_reap_children(driver)

3
deletefb/tools/login.py

@ -99,5 +99,6 @@ def login(user_email_address,
time.sleep(5)
return driver
except:
except BaseException as e:
print('An exception occurred: {}'.format(e))
quit_driver_and_reap_children(driver)

3
deletefb/tools/wall.py

@ -63,7 +63,8 @@ def delete_posts(driver,
try:
delete_button = menu.find_element_by_xpath("//a[@data-feed-option-name=\"{0}\"]".format(button_type))
break
except SELENIUM_EXCEPTIONS:
except SELENIUM_EXCEPTIONS as e:
print(e)
continue
if not delete_button:

Loading…
Cancel
Save