Jump to content
UBot Underground

Is there a way to count words or characters in each word from a scrape?


Recommended Posts

So my end goal is to rid of characters if the word is not above a certain length. Also to cut off the length of how many words there are if its above a certain length. For example if I was to scrape a 1500 word I want to chop off the last 500 words so its only 1000 words max. More importantly I would like to know how to delete words that have less than 3 characters for example. I've attached an example that scrapes the tags of this youtube video into a variable, for example theres the words "cob" and "cell" both three characters long. How would I scrape the tags and delete those any words such as those two that have 3 or less total characters?

set_tags.ubot

Link to post
Share on other sites

Hmm for the word count thing, you could do something like

$list total(
   $list from text(
       #my text,
       " "))

 

to give you the word count. The pro version has a $text length constant that gives you the letter count of each word. It can be a little tricky in standard.

Link to post
Share on other sites
  • 1 year later...

This is something I'm in need of now, but I can't open that file because it was done in v3.  Would it be possible for you to paste the code so I can integrate it into my own bot?

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...