Created
          August 31, 2021 12:24 
        
      - 
      
 - 
        
Save broschke/453b19969d8368189eacf0e34805354f to your computer and use it in GitHub Desktop.  
    vestaboard_eruo_cup
  
        
  
    
      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
    
  
  
    
  | #!/usr/bin/env python | |
| # coding: utf-8 | |
| import requests as re | |
| import json | |
| import cred | |
| import time | |
| headers = {'X-Vestaboard-Api-Key': cred.key, | |
| 'X-Vestaboard-Api-Secret': cred.secret} | |
| url_link = f'https://platform.vestaboard.com/subscriptions/{cred.sub_id}/message' | |
| text_body = '2020 Euro Cup Winner?' | |
| italy_body = {'characters': | |
| [[66, 66, 66, 66, 66, 66, 66, 69, 69, 69, 69, 69, 69, 69, 69, 63, 63, 63, 63, 63, 63, 63], | |
| [66, 66, 66, 66, 66, 66, 66, 69, 69, 69, 69, 69, 69, 69, 69, 63, 63, 63, 63, 63, 63, 63], | |
| [66, 66, 66, 66, 66, 66, 66, 69, 69, 69, 69, 69, 69, 69, 69, 63, 63, 63, 63, 63, 63, 63], | |
| [66, 66, 66, 66, 66, 66, 66, 69, 69, 69, 69, 69, 69, 69, 69, 63, 63, 63, 63, 63, 63, 63], | |
| [66, 66, 66, 66, 66, 66, 66, 69, 69, 69, 69, 69, 69, 69, 69, 63, 63, 63, 63, 63, 63, 63], | |
| [66, 66, 66, 66, 66, 66, 66, 69, 69, 69, 69, 69, 69, 69, 69, 63, 63, 63, 63, 63, 63, 63]]} | |
| england_body = {'characters': | |
| [[69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 63, 63, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69], | |
| [69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 63, 63, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69], | |
| [63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63], | |
| [63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63], | |
| [69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 63, 63, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69], | |
| [69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 63, 63, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69]]} | |
| who_you_body = {'characters': | |
| [[0, 0, 0, 0, 0, 23, 8, 15, 0, 25, 15, 21, 0, 7, 15, 20, 60, 0, 0, 0, 0, 0], | |
| [66, 66, 66, 69, 69, 69, 63, 63, 63, 0, 0, 0, 0, 69, 69, 69, 69, 63, 69, 69, 69, 69], | |
| [66, 66, 66, 69, 69, 69, 63, 63, 63, 0, 0, 0, 0, 69, 69, 69, 69, 63, 69, 69, 69, 69], | |
| [66, 66, 66, 69, 69, 69, 63, 63, 63, 0, 24, 0, 0, 63, 63, 63, 63, 63, 63, 63, 63, 63], | |
| [66, 66, 66, 69, 69, 69, 63, 63, 63, 0, 0, 0, 0, 69, 69, 69, 69, 63, 69, 69, 69, 69], | |
| [66, 66, 66, 69, 69, 69, 63, 63, 63, 0, 0, 0, 0, 69, 69, 69, 69, 63, 69, 69, 69, 69]]} | |
| body = {'text': text_body} | |
| re.post(url_link, data=json.dumps(body), headers=headers) | |
| time.sleep(10) | |
| re.post(url_link, data=json.dumps(italy_body), headers=headers) | |
| time.sleep(10) | |
| re.post(url_link, data=json.dumps(england_body), headers=headers) | |
| time.sleep(10) | |
| re.post(url_link, data=json.dumps(who_you_body), headers=headers) | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment