Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
imdb-pie
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
3
Issues
3
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
richardARPANET
imdb-pie
Commits
6b77b36f
Commit
6b77b36f
authored
Apr 17, 2018
by
Richard
Committed by
GitHub
Apr 17, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4 from richardARPANET/py2-fix
python 2 setup.py compat fix
parents
40b823d0
35df2583
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
5 deletions
+8
-5
HISTORY.rst
HISTORY.rst
+3
-1
setup.py
setup.py
+1
-0
src/imdbpie/imdbpie.py
src/imdbpie/imdbpie.py
+4
-4
No files found.
HISTORY.rst
View file @
6b77b36f
...
@@ -6,7 +6,9 @@ Release History
...
@@ -6,7 +6,9 @@ Release History
5.4.4 (unreleased)
5.4.4 (unreleased)
++++++++++++++++++
++++++++++++++++++
- Nothing changed yet.
- Python 2.x setup.py bugfix.
- Bugfix for ``title_exists`` method returning ``None``.
- Bugfix for ``get_title`` raising an incorrect exception when redirection title.
5.4.3 (2018-04-05)
5.4.3 (2018-04-05)
...
...
setup.py
View file @
6b77b36f
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
from
__future__
import
absolute_import
from
__future__
import
absolute_import
import
os
import
os
from
codecs
import
open
from
setuptools
import
find_packages
,
setup
from
setuptools
import
find_packages
,
setup
...
...
src/imdbpie/imdbpie.py
View file @
6b77b36f
...
@@ -103,9 +103,9 @@ class Imdb(Auth):
...
@@ -103,9 +103,9 @@ class Imdb(Auth):
def
title_exists
(
self
,
imdb_id
):
def
title_exists
(
self
,
imdb_id
):
self
.
validate_imdb_id
(
imdb_id
)
self
.
validate_imdb_id
(
imdb_id
)
page_url
=
'http://www.imdb.com/title/{0}/'
.
format
(
imdb_id
)
page_url
=
'http
s
://www.imdb.com/title/{0}/'
.
format
(
imdb_id
)
response
=
self
.
session
.
head
(
page_url
)
response
=
self
.
session
.
get
(
page_url
,
allow_redirects
=
False
)
if
response
.
status_code
==
httplib
.
OK
:
if
response
.
status_code
==
httplib
.
OK
:
return
True
return
True
...
@@ -298,8 +298,8 @@ class Imdb(Auth):
...
@@ -298,8 +298,8 @@ class Imdb(Auth):
def
is_redirection_title
(
self
,
imdb_id
):
def
is_redirection_title
(
self
,
imdb_id
):
self
.
validate_imdb_id
(
imdb_id
)
self
.
validate_imdb_id
(
imdb_id
)
page_url
=
'http://www.imdb.com/title/{0}/'
.
format
(
imdb_id
)
page_url
=
'http
s
://www.imdb.com/title/{0}/'
.
format
(
imdb_id
)
response
=
self
.
session
.
head
(
page_url
)
response
=
self
.
session
.
get
(
page_url
,
allow_redirects
=
False
)
if
response
.
status_code
==
httplib
.
MOVED_PERMANENTLY
:
if
response
.
status_code
==
httplib
.
MOVED_PERMANENTLY
:
return
True
return
True
else
:
else
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment