kopia lustrzana https://codeberg.org/edent/Mastodon_Tools
15 wiersze
358 B
Python
Executable File
15 wiersze
358 B
Python
Executable File
#!/usr/bin/env python
|
|
from mastodon import Mastodon
|
|
import json
|
|
import requests
|
|
import config
|
|
|
|
# Set up access
|
|
mastodon = Mastodon( api_base_url=config.instance, access_token=config.write_access_token )
|
|
|
|
message = "media test"
|
|
|
|
media = mastodon.media_post("https://placekitten.com/200", description="Some alt text.")
|
|
|
|
mastodon.status_post(status = message)
|