When I use the code below, it splits one div into fifteen items in the array. The thing is that I want this one post as one item in the array. It probably happens because of <br>
tags, but I am not sure how to solve it.
from lxml import html
import requests
page = requests.get('http://www.city-data.com/forum/economics/2056372-minimum-wage-vs-liveable-wage.html')
tree = html.fromstring(page.text)
details = tree.xpath('//div[contains(@id, "post_message_33583236")]/text()')
print len(details) #prints 15