Grabbing weather information

Hi guys

I am trying to do a simple grab information and if condition.
The bot goes to weather.com and enters a city or postcode, then on the next page takes the weather temperature and displays a message box depending on the IF statement. However the bot is also picking p the o next to the temperature which is breaking the IF statement, can someone help how i could remove this? I’ve attached my workflow thanksMain.xaml (9.7 KB)

2 Likes

can i see the output??
how’s it coming??

Sorry, what do you mean the output?

what do you want to remove??

The ° symbol from when it gets text

image
are you taking from this part??

yep exactly

1 Like

degree.Trim.TrimEnd("°"c)
cheers
@Adeel_Ahmed
let me know if this works for you!

So with degree variable use a assign activity before IF condition like this

out_degree = Convert.ToInt32(System.Text.RegularExpressions.Regex.Match(degree.ToString,”(\d)+”).ToString.Trim)

Where out_degree is a int32 variable
And now in IF condition mention as
out_degree< 33

Cheers @Adeel_Ahmed

Where or how do i use that?

Thanks will give this a go

1 Like

in message box!
image
cheers

do we get the “-”(minus) symbol also??

Then expression be like this if we want to include the - symbol in front
out_degree = Convert.ToInt32(System.Text.RegularExpressions.Regex.Match(degree.ToString,”-(\d)+|(\d)+”).ToString.Trim)

@Pradeep_Shiv @Adeel_Ahmed

1 Like