Skip to content

Commit

Permalink
Improve failed to login message (closes #35)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelja committed Oct 20, 2021
1 parent 1e6f8d7 commit de37272
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions deleter.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,21 @@ const activityURL string = "https://mbasic.facebook.com/<profileid>/allactivity"
var yearOptions = []string{"2021", "2020", "2019", "2018", "2017", "2016", "2015", "2014", "2013", "2012", "2011", "2010", "2009", "2008", "2007", "2006"}
var monthStrings = []string{"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}
var categoriesMap = map[string]string{
"Comments": "commentscluster",
"Posts": "statuscluster",
"Likes and Reactions": "likes",
"Search History": "search",
"Event Responses": "eventrsvps",
"Your Events": "createdevents",
"Event Invitations": "invitedevents",
"Photos and Videos": "photos",
"Group Posts and Comments": "groupposts",
"Group Reactions": "groupreactions",
"Others' Posts To Your Timeline": "wallcluster",
"Posts You're Tagged In": "tagsbyotherscluster",
"All App Activity": "allapps",
"Instagram Photos and Videos": "genericapp&category_app_id=124024574287414",
"Spotify": "genericapp&category_app_id=174829003346",
"Comments": "commentscluster",
"Posts": "statuscluster",
"Likes and Reactions": "likes",
"Search History": "search",
"Event Responses": "eventrsvps",
"Your Events": "createdevents",
"Event Invitations": "invitedevents",
"Photos and Videos": "photos",
"Group Posts and Comments": "groupposts",
"Group Reactions": "groupreactions",
"Others' Posts To Your Timeline": "wallcluster",
"Posts You're Tagged In": "tagsbyotherscluster",
"All App Activity": "allapps",
"Instagram Photos and Videos": "genericapp&category_app_id=124024574287414",
"Spotify": "genericapp&category_app_id=174829003346",
}

var tokensInURLs = [...]string{"/removecontent", "/delete", "/report", "/events/remove.php", "&amp;content_type=4&amp;", "action=delete"}
Expand Down Expand Up @@ -93,7 +93,7 @@ func retrieveRequestString(resp *http.Response, err error) string {
fmt.Println("error during http request")
}
strBody := string(body)
if (strings.Contains(strBody, "You can try again later") || strings.Contains(strBody, "temporarily blocked")) {
if strings.Contains(strBody, "You can try again later") || strings.Contains(strBody, "temporarily blocked") {
panic("ratelimited, please open https://mbasic.facebook.com and navigate to your activity log to see more information.")
}
return strBody
Expand All @@ -115,7 +115,7 @@ func newFbLogin(req *requester) *fbLogin {
fbl.Login()
req.jar.Save()
if !fbl.IsLoggedIn() {
panic("Failed to login")
panic("Failed to login. Please open https://mbasic.facebook.com in a browser and login there. Facebook might requires an additional verification. Afterwards, you can try again.")
}
}
return fbl
Expand Down

0 comments on commit de37272

Please sign in to comment.