How can I log in to Stack Exchange using curl?
问题 I would like to log in to a remote website from Terminal, which requires an username and password to log in. So I first tried to log in to one of the Stack Exchange site. According to this answer, you use -u username:password to add your credentials. So I tried the following: USERNAME="mine@gmail.com" PASSWORD="myPassword" URL="https://sustainability.stackexchange.com/" curl $URL -u $USERNAME:$PASSWORD But the resultant website is not a page that the logged-in user sees but it is a page that