title: Assigning variables to scraped values
body: <p>Using beautifulsoup to scrape a website (this guy as an example here:<a href="https://rocket-league.com/player/Guuter" rel="nofollow noreferrer">https://rocket-league.com/player/Guuter</a>), I have managed to get the text I want.  However, I do not know how to properly assign each string to certain variables to after format them correctly.  It is a trading website so I want to separate the trade into the &quot;has&quot; and &quot;wants&quot; section</p>
  <p>Where I have got so far (btw the massive gaps are included):</p>
  <pre><code>Has:
  
  
  
  #first item
  Titanium White #colour
  
  Credits #item
  
  
  200 #amount
  
  
  
  
  #second item
  Titanium White #colour
  
  Credits #item
  
  
  250 #amount
  
  Wants:
  
  
  
  
  Titanium White #colour
  
  Neo-Thermal #item
  
  #no amount this time - therefore is 1
  
  
  
  
  
  #second item
  Grey #colour
  
  Halo #item
  
  #once again no amount - therefore is 1
  </code></pre>
  <p>It is a discord bot that when you look up someone's name with a command it gives you their first trade (would like to be more - please let me know how to do this - not letting me use find_all without an error)</p>
  <pre class="lang-py prettyprint-override"><code>@bot.command()
  async def rlgarage(ctx, arg):
   name = arg
   #name = &quot;Guuter&quot;
   page = requests.get(&quot;https://rocket-league.com/player/&quot;+name)
   soup = BeautifulSoup(page.content, 'html.parser')
  
   tradeitems = soup.find(class_=&quot;rlg-trade__items&quot;)
   haveitems = tradeitems.find(class_=&quot;rlg-trade__itemshas&quot;)
   haveitemstext = haveitems.get_text()
   wantitems = tradeitems.find(class_=&quot;rlg-trade__itemswants&quot;)
   wantitemstext = wantitems.get_text()
   await ctx.send(&quot;Has:&quot; + haveitemstext + &quot;Wants:&quot; + wantitemstext)
  </code></pre>
  <p>prefered output:</p>
  <pre><code>Has:
  
  Titanium White Credits (200)
  
  Titanium White Credits (250)
  
  Wants:
  
  Titanium White Neo-Thermal
  
  Grey Halo
  </code></pre>