return None if ID is not numeric
This commit is contained in:
parent
15d253133b
commit
746e9fcbb7
1 changed files with 4 additions and 1 deletions
|
|
@ -29,4 +29,7 @@ class YoupornVideo(BaseVideo):
|
|||
|
||||
@classmethod
|
||||
def id2url(cls, _id):
|
||||
return 'http://www.youporn.com/watch/%d' % int(_id)
|
||||
if _id.isdigit():
|
||||
return 'http://www.youporn.com/watch/%d' % int(_id)
|
||||
else:
|
||||
return None
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue