Reputation: 159
I need to get the string ': 1:30 pm' in the following piece of html code using python and selenium: https://gyazo.com/faa95c118c25db13f5f71361eb795d6c
I wouldn't know how to do it since it seems like I can't use anything to identify it.
Update bigger section of the html code: https://gyazo.com/dec5665f771945b7671ef6a811b08dfe
That is all I have, and I would need a program that returns me the string with the time, which changes everyday.
Upvotes: 0
Views: 42
Reputation: 1308
Without the entire file, it's hard to tell you the xpath to find that specific string. You could try getting the parent element's text and then using Python to extract the time.
my_str = 'Room: 105 Start Time: 1:30 pm'
my_time = my_str[my_str.index('Start Time: ') + len('Start Time: '):]
Upvotes: 1