Skip to content

nickrusso42518/tweeter-lite

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

Lightweight Tweet Validator

This project can be used to verify Twitter messages (tweets) against two constraints:

  1. Length: tweets can be only so long
  2. Valid URL: If you embed a URL use Python httpx to ensure it works

Install the required packages with pip install -r requirements.txt.

Then, run the script with python tl.py.

If the length is too long, you'll see a message like this:

bad/long.txt: Message to long -> 283 < 260
-------------------------------------------------------

If the URL does not return status 200 (OK), you'll see a message like this:

http://njrusmc.net/bad: HEAD failed -> 404 / Not Found
-------------------------------------------------------

Regardless, the text of the tweet is printed out last, allowing for easy copy/paste into Twitter. The absence of any error messages is an indication that the tweet has passed all tests.

About

Tweet validation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published