Python Beautifulsoup access text in tags?
<p>I am having trouble finding and returning the value that appears to be in the <code>&lt;b&gt;</code> tag, I have no luck when reading any of the tags. </p>

<p>I don't want to post a hundred lines of the view-source info and am not sure how to properly post the link to it but here is the webpage if you would be able to view the page source yourself <a href="http://yugiohprices.com/card_price?name=Dark+Magician" rel="nofollow">http://yugiohprices.com/card_price?name=Dark+Magician</a> </p>

<p>the information I am trying to retrieve
<a href="https://postimg.org/image/5fwxfqjqf/" rel="nofollow">https://postimg.org/image/5fwxfqjqf/</a></p>

<p>Here is the code I am using</p>

<pre><code>import requests
from bs4 import BeautifulSoup
r = requests.get('http://yugiohprices.com/card_price?name=Dark+Magician'); 
soup = BeautifulSoup(r.content, "lxml")
print soup.find('b').text
</code></pre>

<p>this is the output</p>

<p>Home 
| Top 100 | Browse Cards | Browse Sets</p>

<p>Purchase Statistics
                      | Watchlist | Card Pricer</p>

<p>Sell My Cards | Price Alerts | Blog | FAQ | Settings</p>

<p>No matter what I change or try I am unable to access the "LDK2-ENY10" text</p>

<p>You can see the page takes a while to load the data, the data is requested through an Ajax request so what requests returns is not what you see in your browser. You can mimic the ajax request with a simple get to <a href="http://yugiohprices.com/get_card_prices/Dark+Magician" rel="nofollow">http://yugiohprices.com/get_card_prices/Dark+Magician</a>, passing a <em>timestamp</em>:</p>

<pre><code>import requests
from time import time

r = requests.get("http://yugiohprices.com/get_card_prices/Dark+Magician?_={}".format(int(time())))

print(r.content)
</code></pre>

<p>That you will see gives you all the details about the card, so to get what you want just find the <em>anchor</em> with the <em>href</em> starting with <em>/browse_sets?set</em>:</p>

<pre><code>In [1]: import requests
   ...: from time import time
   ...: from bs4 import BeautifulSoup
   ...: 
   ...: r = requests.get("http://yugiohprices.com/get_card_prices/Dark+Magician?
   ...: _={}".format(int(time())))
   ...: soup = BeautifulSoup(r.content, "lxml")
   ...: print(soup.select_one("a[href^=/browse_sets?set]").text)
   ...: 
Legendary Decks II

In [2]: 
</code></pre>

python beautifulsoup