How to pull div attributes with BeautifulSoup in Python
<p>I'm trying to pull this data (lat and lng):</p>

<pre><code>&lt;div class="location"
    lat="1234"
    lng="5678"
&gt;
</code></pre>

<p>This is giving me nothing:</p>

<pre><code>print (soup.find_all("div", { "class" : "location"}))
</code></pre>

<p>My eventual goal is to store these values in a dictionary. Thanks.</p>

<p>From BeautifulSoup docs you might be using find_all() wrong.
<a href="https://www.crummy.com/software/BeautifulSoup/bs4/doc/#the-keyword-arguments" rel="nofollow">https://www.crummy.com/software/BeautifulSoup/bs4/doc/#the-keyword-arguments</a></p>

<p>Try:</p>

<pre><code>print (soup.find_all("div",class_="location"))
</code></pre>

<p>or </p>

<pre><code>print (soup.find_all("div",attrs={"class": "location"}))
</code></pre>

python beautifulsoup