Jan-18-2020, 11:28 PM
That would be the text under p tag,so should be like this.
tv.xpath("//p[@class='drug-subtitle']/text()")That should give.
Output: ziprasidone (zi PRAY si done)
So a quick clean up to get word.>>> s = ' ziprasidone (zi PRAY si done)' >>> s.strip().split(' (')[0] 'ziprasidone'