Skip to content

Instantly share code, notes, and snippets.

@Itz-fork
Created January 5, 2022 05:32
Show Gist options
  • Save Itz-fork/15f099b82b28bc6de87878d68ff1eaa6 to your computer and use it in GitHub Desktop.
Save Itz-fork/15f099b82b28bc6de87878d68ff1eaa6 to your computer and use it in GitHub Desktop.
Spam unicode characters count Example
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