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 os
|
||||||
import time
|
import time
|
||||||
|
|
||||||
from BeautifulSoup import BeautifulSoup
|
|
||||||
import chardet
|
import chardet
|
||||||
import oxlib
|
import oxlib
|
||||||
from oxlib import stripTags, decodeHtml, findRe, findString
|
from oxlib import stripTags, decodeHtml, findRe, findString
|
||||||
|
@ -284,6 +283,8 @@ def getMovieCredits(imdbId):
|
||||||
return credits
|
return credits
|
||||||
|
|
||||||
def getMovieTrailers(imdbId):
|
def getMovieTrailers(imdbId):
|
||||||
|
from BeautifulSoup import BeautifulSoup
|
||||||
|
|
||||||
url = "%strailers" % getUrlBase(imdbId)
|
url = "%strailers" % getUrlBase(imdbId)
|
||||||
data = readUrlUnicode(url)
|
data = readUrlUnicode(url)
|
||||||
soup = BeautifulSoup(data)
|
soup = BeautifulSoup(data)
|
||||||
|
@ -583,6 +584,8 @@ class IMDb:
|
||||||
return getMovieYear(self.imdb)
|
return getMovieYear(self.imdb)
|
||||||
|
|
||||||
def parse(self):
|
def parse(self):
|
||||||
|
from BeautifulSoup import BeautifulSoup
|
||||||
|
|
||||||
data = self.getPage()
|
data = self.getPage()
|
||||||
IMDbDict ={}
|
IMDbDict ={}
|
||||||
info = getMovieInfo(self.imdb)
|
info = getMovieInfo(self.imdb)
|
||||||
|
|
Loading…
Reference in a new issue