Get meta tag content property with BeautifulSoup and Python
<p>I am trying to use python and beautiful soup to extract the content part of the tags below:</p>

<pre><code>&lt;meta property="og:title" content="Super Fun Event 1" /&gt;
&lt;meta property="og:url" content="http://superfunevents.com/events/super-fun-event-1/" /&gt;
</code></pre>

<p>I'm getting BeautifulSoup to load the page just fine and find other stuff (this also grabs the article id from the id tag hidden in the source), but I don't know the correct way to search the html and find these bits, I've tried variations of find and findAll to no avail. The code iterates over a list of urls at present...</p>

<pre><code>#!/usr/bin/env python
# -*- coding: utf-8 -*-

#importing the libraries
from urllib import urlopen
from bs4 import BeautifulSoup

def get_data(page_no):
    webpage = urlopen('http://superfunevents.com/?p=' + str(i)).read()
    soup = BeautifulSoup(webpage, "lxml")
    for tag in soup.find_all("article") :
        id = tag.get('id')
        print id
# the hard part that doesn't work - I know this example is well off the mark!        
    title = soup.find("og:title", "content")
    print (title.get_text())
    url = soup.find("og:url", "content")
    print (url.get_text())
# end of problem

for i in range (1,100):
    get_data(i)
</code></pre>

<p>If anyone can help me sort the bit to find the og:title and og:content that'd be fantastic!</p>