This repository was archived by the owner on Jan 14, 2025. It is now read-only.
New custom flags, better debug info, updated default behavior and documentation#50
Merged
Conversation
marcelja
reviewed
Mar 28, 2022
marcelja
left a comment
Owner
There was a problem hiding this comment.
Thanks a lot. Looks good to me. I added a few small comments.
Co-authored-by: Marcel Jankrift <marcel@jankrift.de>
Co-authored-by: Marcel Jankrift <marcel@jankrift.de>
Closed
marcelja
approved these changes
Mar 30, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi there! First of all thanks for making
facebook-delete, it's a really awesome tool. I am opening this PR to address a few issues that I (and other users) have encountered.Please note that this is the very first time I write code in Go and I am aware some of this code is quite ugly, but hopefully it can still be ok and maybe you can find time to give some input.
Here are the main changes:
Custom flags
This fixes (almost entirely) #42
As shown in the updated
README.md, I am introducing a few flags to run the program more quickly from terminal:-customYears: allows to define comma separated years and skip the menu selection-customMonths: allows to define comma separated months and skip the menu selection-selectAllContent: allows to select every content type and skip the menu selectionFor the first two flags, I am running some regex to be sure the user types valid input. If the input is not valid, they will be asked for manual input as by default behavior.
For the months specifically, I made a map (pretty ugly, and I wonder if you have any input on how to make this suck less) that allows both single and double digits. I saw that the code base relies on strings (ie
Jan,Feb, ...), but it felt more universal (and easier to validate input) to rely on digits instead. I also allow the optionallto do full selection as well.For content type I only put a single boolean because I didn't really have time to implement proper validation for each type of content.
Better debug info
While this doesn't fully fix #38, it does throw now a panic related to the program not being able to parse the cookies. It also points the user to the location of the cookie file that can be deleted to fix the issue. I have tried to manually nuke the cookies using
RemoveAll()but with no positive result. The current solution is better than a generic out of range panic, though.Updated default behavior
My experience is that with
limitRateset to 0, Facebook will currently block your activity feed right away. Many other users reported the same issue. I do all my queries at140000ms rate now, and that's the only way I can currently circumvent the issue. Still, I set the new default to30000ms, and prompted the user to play around with this value a bit to find what works for them. Again, not ideal, but0is basically an insta-block right now :(Documentation
Finally, I tried and document all of the above in the clearer way possible on the
README.mdfile.Once again, apologies if some of this code is really ugly. If you don't have time to review and don't want to merge that's also completely fine. Thanks again for making this tool available.