diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 059c1397215b48527bfe13599ee1b378378ed0fc..b68df52f6f97697a4ee3535813da9b25c3c84b54 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,28 +1,40 @@ before_script: + # Install pyenv - apt-get update - apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev - - pip install tox - git clone https://github.com/pyenv/pyenv.git ~/.pyenv - export PYENV_ROOT="$HOME/.pyenv" - export PATH="$PYENV_ROOT/bin:$PATH" + - eval "$(pyenv init -)" + # Install tox + - pip install tox + +test:python26: + script: + - pyenv install 2.6.9 + - pyenv shell 2.6.9 + - tox -e py26-normal + +test:python27: + script: + - pyenv install 2.7.14 + - pyenv shell 2.7.14 + - tox -e py27-normal + +test:python34: + script: + - pyenv install 3.4.7 + - pyenv shell 3.4.7 + - tox -e py34-normal test:python35: script: - pyenv install 3.5.4 - - eval "$(pyenv init -)" - pyenv shell 3.5.4 - tox -e py35-normal test:python36: script: - pyenv install 3.6.4 - - eval "$(pyenv init -)" - pyenv shell 3.6.4 - tox -e py36-normal - -test:python34: - script: - - pyenv install 3.4.7 - - eval "$(pyenv init -)" - - pyenv shell 3.4.7 - - tox -e py34-normal diff --git a/src/imdbpie/imdbpie.py b/src/imdbpie/imdbpie.py index 9d553cbb094979699fa9ab7786d11e40fd457019..d0cfaffa509250d8e8581baf60d6dcd4bcabd3b9 100644 --- a/src/imdbpie/imdbpie.py +++ b/src/imdbpie/imdbpie.py @@ -45,7 +45,6 @@ _SIMPLE_GET_ENDPOINTS = { 'get_title_awards': '/title/{imdb_id}/awards', 'get_title_ratings': '/title/{imdb_id}/ratings', 'get_title_credits': '/title/{imdb_id}/fullcredits', - 'get_title_certification': '/title/{imdb_id}/certification', 'get_name': '/name/{imdb_id}/fulldetails', 'get_name_filmography': '/name/{imdb_id}/filmography', } @@ -55,7 +54,7 @@ class Imdb(Auth): def __init__(self, locale=None, exclude_episodes=False, session=None): self.locale = locale or 'en_US' - self.region = self.locale.split('_')[-1] + self.region = self.locale.split('_')[-1].upper() self.exclude_episodes = exclude_episodes self.session = session or requests.Session() self._cachedir = tempfile.gettempdir() @@ -115,7 +114,7 @@ class Imdb(Auth): if ( self.exclude_episodes is True and - resource['titleType'] == 'tvEpisode' + resource['titleType'].lower() == 'tvepisode' ): raise LookupError( 'Title not found. Title was an episode and '