only import BeautifulSoup if used in depricated functions

This commit is contained in:
j 2010-01-23 10:03:14 +11:00
parent 746b355c50
commit 51a0c7dc4a

View file

@ -6,7 +6,6 @@ import re
import os
import time
from BeautifulSoup import BeautifulSoup
import chardet
import oxlib
from oxlib import stripTags, decodeHtml, findRe, findString
@ -284,6 +283,8 @@ def getMovieCredits(imdbId):
return credits
def getMovieTrailers(imdbId):
from BeautifulSoup import BeautifulSoup
url = "%strailers" % getUrlBase(imdbId)
data = readUrlUnicode(url)
soup = BeautifulSoup(data)
@ -583,6 +584,8 @@ class IMDb:
return getMovieYear(self.imdb)
def parse(self):
from BeautifulSoup import BeautifulSoup
data = self.getPage()
IMDbDict ={}
info = getMovieInfo(self.imdb)