Jan-18-2020, 08:23 PM
<p class='drug-subtitle'><b>Generic Name:</b> ziprasidone (zi PRAY si done)<br><b>Brand Names:</b> <i>Geodon</i></p>
i am trying to figure out what to enter for the xpath in the html code above to pull the word ziprasidone. I already figured out how to pull
Geodon by creating the variable as shown in the code below. If I change the /i/text() to /b/text() it prints {Generic Name:}{Brand Names:}. What would I need to change in the xpath shown below to pull the word ziprasidone?
i am trying to figure out what to enter for the xpath in the html code above to pull the word ziprasidone. I already figured out how to pull
Geodon by creating the variable as shown in the code below. If I change the /i/text() to /b/text() it prints {Generic Name:}{Brand Names:}. What would I need to change in the xpath shown below to pull the word ziprasidone?
brandname = tv.xpath('//p[@class="drug-subtitle"]/i/text()')