A Twitter plugin for Sopel
Project description
sopel-twitter
A Twitter plugin for Sopel.
Installation
Releases are hosted on PyPI, so after installing Sopel, all you need is pip
:
$ pip install sopel-twitter
If you want to use the development version, simply clone the repository and use
pip install path/to/sopel-twitter
Configuring
Twitter cookies are required to use this plugin as of 1 July 2023. You may want to minimize the risk of adverse action by using a throwaway login instead of your real profile; however, note that doing so will affect the rate limit available to this plugin.
The easiest way to configure sopel-twitter
is via Sopel's configuration
wizard – simply run sopel-plugins configure twitter
and enter the cookie
values for which it prompts you.
Otherwise, you can edit your bot's configuration file:
[twitter]
cookies =
auth_token=df4c7364f4fac2b3843904ecc566b0e1accdf98b;
ct0=23f96509cba936b732cd39e171dce0fa5da9ecd1d7f3551258fe3e1a21da79a797e80496e8190613ba8a8ebc07ef6d8004b17518e84f9b6f8100738c5243a3da3139c87a5a55e46d70ed99cf0f068a23
# Required: Cookies from Twitter
# Newlines are not required, but the semicolon (;) very much is!
# You will have to pull this from your own logged-in account; rate limits will
# vary depending on the account's verification/Blue status.
show_quoted_tweets = True
# Optional: For quote-tweets, send a second message showing the quoted tweet?
# Default: True
alternate_domains =
fxtwitter.com
vxtwitter.com
nitter.net
# Optional: What other domains should we treat like twitter domains?
# Default: fxtwitter.com, vxtwitter.com, nitter.net
Usage
Just send a link to a tweet or profile!
You can also retrieve a user's info with the .twitinfo
command:
< Wiz> .twitinfo NASA
< Sopel> [Twitter] NASA (@NASA) ✔️ | Pale Blue Dot | http://www.nasa.gov/
| 204 friends, 46,602,251 followers | 65,377 tweets, 13,040 ♥s
| Joined: 2007-12-19 - 20:20:32UTC | There's space for everybody. ✨
Changes between 1.1.0 and 1.2.0
Breaking:
- Twitter cookies are now required
Changed:
- Updated to
tweety-ns
0.8 (#48)
Changes between 1.0.1 and 1.1.0
Changed:
- Updated to
tweety-ns
0.7, including revamped exceptions (#46)
Changes between 1.0.0 and 1.0.1
Fixed:
- Don't cache Tweety object; it stops working after some hours (#43)
Changes between 0.4.1 and 1.0.0
Important: Package name is now sopel-twitter
Added:
- Option to specify additional domains that can be treated as Twitter links (#34, #37)
Changed:
- Use
BooleanAttribute
setting type where appropriate (#27) - Use future-proof
plugin
decorators (#30) - Migrate from namespace package to entry point (#41)
- Migrate to Tweety library for data access; no more API keys (#42)
- Minimum Sopel version raised to 7.1 (#27)
Fixed:
/i/web/status
links (#33)- Collapse consecutive newlines (#36)
- Properly set up logger (#38)
Changes between 0.4.0 and 0.4.1
Fixed:
- Detecting user profile links with trailing slash or query params (#28)
- Error when quoted tweet has been deleted (#31)
Changes between 0.3.2 and 0.4.0
Added:
.twitinfo
command for user lookup (#20)- Support for mobile links (#21)
Changed:
- Updated documentation for configuration (#25) and setup of Twitter API account
Fixed:
- Media link output when quoted tweets are involved (#24)
Changes between 0.3.1 and 0.3.2
Fixed:
- Regression in profile link handling (#16)
Changes between 0.3.0 and 0.3.1
Fixed:
- Stricter
/i/
URL matching (#15)
Changes between 0.2.1 and 0.3.0
Changed:
- Tweet output includes a timestamp now (#13)
- Improved media link handling (#5, #12)
Added:
- Handling for profile/user links (#7)
- Handling for less common
/i/web/status
style links (#11)
Fixed:
- Decode HTML entities before output (#14)
Changes between 0.2.0 and 0.2.1
Fixed:
- Some quoted tweets would cause
KeyError: 'text'
(#9)
Changes between 0.1.2 and 0.2.0
Changed:
- Now requires Sopel 7.x (#8)
- Newlines in tweet text will be replaced with a carriage return symbol, to indicate author intention (#4)
Added:
- Handling of 280-character tweets (#4)
- More graceful handling of API errors (#6)
Meta:
- Package metadata updated (new maintainer, HTTPS links)
Changes between 0.1.1 and 0.1.2
Added:
- Tweet link handling
Changes between 0.1.0 and 0.1.1
Fixed:
- Unicode on Python 3
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for sopel_twitter-1.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2368ebed63e5e4866cb2108472f909454cb60abf635295acbaaa3d4bddcab56d |
|
MD5 | c2f115feb686dd9df58fc01160164c0d |
|
BLAKE2b-256 | 0fdd3b65c9915566fac77437446f558a1e4a957e7145c7f1e6a21158cb9d362e |