There are many options.
You can parse and then query the html document using XPath, for example using LXML (https://docs.python-guide.org/scenarios/scrape/).
from lxml import html
...
@task
my_task(self):
response = self.client.post(...)
tree = html.fromstring(response.text)
# <div title="buyer-name">Carson Busses</div>
# <span class="item-price">$29.95</span>
buyers = tree.xpath('//div[@title="buyer-name"]/text()')
(I have not tested this code :)
Another option is to use pythons built in HTML parser, but that is probably more complicated for this use case (https://docs.python.org/3/library/html.parser.html)
You could also use a regular expression for a quick and dirty solution:
import re
message_regex = re.compile(r"...") # use a regex that actually matches your desired text
...
@task
my_task(self):
response = self.client.post(...)
m = message_regex.match(response.text)
my_value = m.group(1)