<commit_before>from BeautifulSoup import BeautifulSoup
import urllib2
from bs4 import BeautifulSoup                                                   

def match_class(target):                                                        
    def do_match(tag):                                                          
        classes = tag.get('class', [])                                          
        return all(c in classes for c in target)                                
    return do_match                                                             


url = urllib2.urlopen('http://www.starbucks.com/menu/catalog/product?drink=brewed-coffee#view_control=product')

content = url.read()

soup = BeautifulSoup(content, "html.parser")
                                                    
block = soup.find_all(match_class(["blocks", "thumbs"]))
this = block.find_all("span")
print this<commit_msg>Updated coffee_crawler.py<commit_after>import urllib2
from bs4 import BeautifulSoup                                                   

url = urllib2.urlopen('http://www.starbucks.com/menu/catalog/product?drink=brewed-coffee#view_control=product')

content = url.read()

soup = BeautifulSoup(content, "html.parser")
                                                    
table = soup.find("ol", {"class" : "blocks blocks-four-up thumbs"})
spans = table.find_all("span")
name_arr = []
for span in spans:
	name_arr.append( span.string )

print name_arr
{'fraction_non_alphanumeric': 0.09178743961352658, 'fraction_numerical': 0.004140786749482402, 'mean_word_length': 1.380952380952381, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 16, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6227404', 'n_tokens_mistral': 361, 'n_tokens_neox': 342, 'n_words': 70}