pax_global_header 0000666 0000000 0000000 00000000064 13436457030 0014517 g ustar 00root root 0000000 0000000 52 comment=3863a14eedf17551743a8bbccf0237874d7f4a16
woob-3863a14eedf17551743a8bbccf0237874d7f4a16-modules-youporn/ 0000775 0000000 0000000 00000000000 13436457030 0022571 5 ustar 00root root 0000000 0000000 woob-3863a14eedf17551743a8bbccf0237874d7f4a16-modules-youporn/modules/ 0000775 0000000 0000000 00000000000 13436457030 0024241 5 ustar 00root root 0000000 0000000 woob-3863a14eedf17551743a8bbccf0237874d7f4a16-modules-youporn/modules/youporn/ 0000775 0000000 0000000 00000000000 13436457030 0025754 5 ustar 00root root 0000000 0000000 woob-3863a14eedf17551743a8bbccf0237874d7f4a16-modules-youporn/modules/youporn/__init__.py 0000664 0000000 0000000 00000000077 13436457030 0030071 0 ustar 00root root 0000000 0000000 from .module import YoupornModule
__all__ = ['YoupornModule']
woob-3863a14eedf17551743a8bbccf0237874d7f4a16-modules-youporn/modules/youporn/browser.py 0000664 0000000 0000000 00000003304 13436457030 0030011 0 ustar 00root root 0000000 0000000 # -*- coding: utf-8 -*-
# Copyright(C) 2010-2011 Romain Bignon
#
# This file is part of a weboob module.
#
# This weboob module is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This weboob module is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this weboob module. If not, see .
from weboob.browser import PagesBrowser, URL
from weboob.capabilities.base import UserError
from .pages.index import IndexPage
from .pages.video import VideoPage
__all__ = ['YoupornBrowser']
class YoupornBrowser(PagesBrowser):
BASEURL = 'https://www.youporn.com'
home = URL('/$', IndexPage)
search = URL('/search/\?query=(?P.*)', IndexPage)
video = URL('/watch/(?P[0-9]+)/.*', VideoPage)
def get_video(self, _id):
self.video.go(id=_id)
assert self.video.is_here()
return self.page.get_video()
def search_videos(self, pattern, sortby):
if pattern == 'a' or pattern == 'i':
raise UserError('this pattern is not supported');
self.search.go(query=pattern)
assert self.search.is_here()
return self.page.iter_videos()
def latest_videos(self):
self.home.go()
assert self.home.is_here()
return self.page.iter_videos()
woob-3863a14eedf17551743a8bbccf0237874d7f4a16-modules-youporn/modules/youporn/favicon.png 0000664 0000000 0000000 00000002176 13436457030 0030115 0 ustar 00root root 0000000 0000000 PNG
IHDR @ @ iq sRGB pHYs tIME5 tEXtComment Created with GIMPW IDATxOHQ?VDY)CObCFPiPIXuHnCA%I