Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
douban-api-proxy
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
captainwong
douban-api-proxy
Commits
b6fccbd4
Commit
b6fccbd4
authored
Apr 27, 2017
by
Murat L
Committed by
Ozzie Isaacs
Apr 27, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added Google Books and Kobo links (#189)
* Added Google Books and Kobo links * International link to google
parent
4259aa69
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
db.py
cps/db.py
+9
-1
No files found.
cps/db.py
View file @
b6fccbd4
...
...
@@ -81,6 +81,10 @@ class Identifiers(Base):
return
u"DOI"
elif
self
.
type
==
"goodreads"
:
return
u"Goodreads"
elif
self
.
type
==
"google"
:
return
u"Google Books"
elif
self
.
type
==
"kobo"
:
return
u"Kobo"
else
:
return
self
.
type
...
...
@@ -95,6 +99,10 @@ class Identifiers(Base):
return
u"http://www.goodreads.com/book/show/{0}"
.
format
(
self
.
val
)
elif
self
.
type
==
"douban"
:
return
u"https://book.douban.com/subject/{0}"
.
format
(
self
.
val
)
elif
self
.
type
==
"google"
:
return
u"https://books.google.com/books?id={0}"
.
format
(
self
.
val
)
elif
self
.
type
==
"kobo"
:
return
u"https://www.kobo.com/ebook/{0}"
.
format
(
self
.
val
)
else
:
return
u""
...
...
@@ -353,4 +361,4 @@ def setup_db():
Session
=
sessionmaker
()
Session
.
configure
(
bind
=
engine
)
session
=
Session
()
return
True
\ No newline at end of file
return
True
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