Created
September 22, 2019 05:00
-
-
Save tribela/660ad9bd1b012731bf6f8c01253da7d8 to your computer and use it in GitHub Desktop.
Mastodon date site spammer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
from itertools import product | |
from mastodon import Mastodon | |
app = Mastodon( | |
client_id=os.getenv('MASTODON_CLIENT_KEY'), | |
client_secret=os.getenv('MASTODON_CLIENT_SECRET'), | |
access_token=os.getenv('MASTODON_ACCESS_TOKEN'), | |
api_base_url=os.getenv('MASTODON_API_BASE_URL') | |
) | |
usernames = [ | |
'haanakko', | |
'naomii', | |
'arialanna', | |
] | |
for username, i in product(usernames, range(100)): | |
app.search(f'@{username}{i}@pawoo.net', result_type='accounts', resolve=True) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Account.where(suspended_at: nil, domain: 'pawoo.net').where('note like ?', '%めったにPawooを使いません。%').find_in_batches do |accs| | |
accs.each do |acc| | |
p acc.username | |
SuspendAccountService.new.call(acc) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment