You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem is in the GetToken function which scrap the csrf token from the login page, I am no expert in go but after checking the source code, I found that you are still using the baseUrl as your target, which is wrong because the login page is under baseUrl/login, then there is the token, I don't know why using the gjuery something package, and because I didn't understand what you are doing by "find(login-button[token]) line I rewrote the function using body, err := ioutil.ReadAll(resp.Body)
then convert the bytes array to a string like bodyString := string(body[:])
then using regex to get the token
That seems to fix the login issue, yes. Unfortunately I think Laracasts has updated the site since this was released, which breaks other parts of the script that also depend on scraping.
I get an error message when attempting to login:
2017/05/02 20:48:47 https://laracasts.com/sessions returned wrong status code: 500, expected 200
My details are correct.
The text was updated successfully, but these errors were encountered: