You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
541 B
17 lines
541 B
from couchpotato import fireEvent
|
|
from couchpotato.core.helpers.variable import splitString
|
|
from couchpotato.core.providers.userscript.base import UserscriptBase
|
|
|
|
|
|
class Reddit(UserscriptBase):
|
|
|
|
includes = ['*://www.reddit.com/r/Ijustwatched/comments/*']
|
|
|
|
def getMovie(self, url):
|
|
name = splitString(url, '/')[-1]
|
|
if name.startswith('ijw_'):
|
|
name = name[4:]
|
|
|
|
year_name = fireEvent('scanner.name_year', name, single = True)
|
|
|
|
return self.search(year_name.get('name'), year_name.get('year'))
|
|
|