Created
January 5, 2022 05:32
-
-
Save Itz-fork/15f099b82b28bc6de87878d68ff1eaa6 to your computer and use it in GitHub Desktop.
Spam unicode characters count Example
This file contains 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 requests | |
def get_spam_unicode_char_count(text): | |
req = requests.get(f"https://nexa-apis.herokuapp.com/unicode?text={text}").json() | |
if req["status"] == "Ok": | |
return req["data"] | |
else: | |
return None | |
uc = get_spam_unicode_char_count("Is this even a spam?")["count"] | |
if uc != 0: | |
print(uc) | |
else: | |
print("Oops, Error Happend!") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment