1. Lars Yencken
  2. data-country-languages

Commits

Lars Yencken  committed 225af9a

Update requirements to use beautifulsoup4.

  • Participants
  • Parent commits 012b093
  • Branches master

Comments (0)

Files changed (2)

File mine_wikipedia.py

View file
  • Ignore whitespace
 import codecs
 import sys
 
-import BeautifulSoup
+import bs4
 import requests
 
 BASE_URL = 'http://en.wikipedia.org/wiki/List_of_official_languages'
 def mine_languages():
     ostream = codecs.getwriter('utf8')(sys.stdout)
     content = safe_get(BASE_URL).content
-    soup = BeautifulSoup.BeautifulSoup(content)
+    soup = bs4.BeautifulSoup(content)
     lang_nodes = [n for n in soup('a', {'class': 'mw-redirect'})
             if n.parent.name == 'b']
 

File requirements.txt

View file
  • Ignore whitespace
-BeautifulSoup==3.2.1
 requests==0.13.9
+beautifulsoup4==4.1.3