only import BeautifulSoup if used in depricated functions
This commit is contained in:
parent
746b355c50
commit
51a0c7dc4a
1 changed files with 4 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue