Using Python to sign into website, fill in a form, then sign out

前端 未结 5 1654
挽巷
挽巷 2021-01-30 09:42

As part of my quest to become better at Python I am now attempting to sign in to a website I frequent, send myself a private message, and then sign out. So far, I\'ve managed to

5条回答
  •  旧时难觅i
    2021-01-30 10:12

    To post data to webpage, use cURL something like this,

    curl -d Name="Shrimant" -d title="Hello world" -d message="Hello, how are you" -d Form_Submit="Send" http://www.example.com/messages.php?action=send

    The “-d” option tells cURL that the next item is some data to be sent to the server at http://www.example.com/messages.php?action=send

提交回复
热议问题