 <p>It can happen, that the string has nothing inside, than it is "None" type, so what I can suppose is to check first if your string is not "None"</p> <pre><code># Extracting the sites def CiteParser(content): soup = BeautifulSoup(content) #print soup print "---&gt; site #: ",len(soup('cite')) result = [] for cite in soup.find_all('cite'): if cite.string is not None: result.append(cite.string.split('/')) print cite return result </code></pre>