Jump to content
UBot Underground

How to skip a list item if its not there?


Recommended Posts

Hi guys,

 

I am building a scrapper and i am scrapping the following details;

 

Company

Address

Contact number

 

 

I have it all working and i want to add a 'Website' scrape. However i don't want it to mess up my lists if their is no website. It needs to add a a blank and then move on if the website does not exist.

 

Still learning ubot guys so please be patient with me 

 

Regards

Link to post
Share on other sites

Use set to set your $next list item, then use an if statement with a comparison.

 

If #set = $nothing then do nothing/else do scrape...

 

Not at the computer at the moment or I would paste up a small code sample.

Link to post
Share on other sites

For a blank, use the $nothing parameter and if you need to check if something is there, use the $if command and an $exists parameter

Link to post
Share on other sites
  • 3 weeks later...

if list item is equal to nothing,increment list item,but I would,clear blank items from the list first before using it

 

or,if item is greater than nothing,than add item to list,if not,do not add to list

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...