Python Requests: SENDING and READING Data from Websites in 4 Minutes

Опубликовано: 02 Ноябрь 2024
на канале: Just Another Coder
604
22

Reading and sending data to websites.
As an example I'll be using discord to teach you how to send discord messages using the python requests library.

Source code:
import requests

url = "  / discord  "
data = {
"content": "THIS MESSAGE WAS SENT WITH PYTHON"
}
header = {
"authorization": "token here"
}

requests.post(url, data=data, headers=header)