0

Hi I want to know about how i can print the the first name instead of full here is the code I'm trying using selenium python

<strong class="pillow-name">Nano Tech</strong>

I just want to print the first name that is "Nano" using BS4 and selenium..

Sarfraz
  • 108
  • 1
  • 7

1 Answers1

1
pillowName = driver.find_element_by_css_selector(".pillow-name").text
firstWord = pillowName.split()[0]
Stan E
  • 3,396
  • 20
  • 31