title: Scrape data using lxml python
body: <p>I'm trying to create a function which scrape the league into a dictionary. However it seem to add an array into the dictionary instead of just the string. How come is this</p>
  
  <p>html i'm trying to scrape:</p>
  
  <pre><code>&lt;fieldset&gt;
      &lt;legend align="center"&gt;
          &lt;a href="/dota2/events/297-the-summit-3"&gt;The Summit 3&lt;/a&gt; 
  
     &lt;/legend&gt;
  &lt;/fieldset&gt;
  </code></pre>
  
  <p>Python get_league function. self.url is the url where the html is</p>
  
  <pre><code>def get_league(self):
      request = requests.get(self.url)
      tree = html.fromstring(request.content)
      league = tree.xpath("//legend[@align='center']/a/text()")
      return league
  </code></pre>
  
  <p>adding into dictionary</p>
  
  <pre><code>data['league'] = self.get_league()[0]
  </code></pre>
  
  <p>The output in JSON</p>
  
  <pre><code>"league": [
  "The Summit 3"
  ]
  </code></pre>
  
  <p>expected output</p>
  
  <pre><code>"league":"The Summit 3"
  </code></pre>