title: How do I get the text of the element using xpath and python?
body: <p>I am having A LOT of trouble getting elements in the webpage using xpath. I need to get the text on the left as well as the right. <a href="https://i.stack.imgur.com/66dm6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/66dm6.png" alt="enter image description here"></a> There are 7 classes, so there will be 7 of these. <a href="https://i.stack.imgur.com/jjjQM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jjjQM.png" alt="enter image description here"></a></p>
  
  <p>Within these divs this is what it looks like <a href="https://i.stack.imgur.com/kNBYt.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kNBYt.png" alt="enter image description here"></a></p>
  
  <p>I just need the text which corresponds to the first photo.
  Below is just ONE attempt</p>
  
  <pre><code>result = session_requests.get(url, headers = dict(referer = url))
  tree = html.fromstring(result.content)
  grades = tree.xpath(".//div[@class='AssignmentClass'][1]//text()")
  print grades
  </code></pre>