pax_global_header 0000666 0000000 0000000 00000000064 13434601454 0014516 g ustar 00root root 0000000 0000000 52 comment=d0a72914b1b13c7766ca764ce93a9d23b473bfe7
woob-d0a72914b1b13c7766ca764ce93a9d23b473bfe7-modules-hds/ 0000775 0000000 0000000 00000000000 13434601454 0021711 5 ustar 00root root 0000000 0000000 woob-d0a72914b1b13c7766ca764ce93a9d23b473bfe7-modules-hds/modules/ 0000775 0000000 0000000 00000000000 13434601454 0023361 5 ustar 00root root 0000000 0000000 woob-d0a72914b1b13c7766ca764ce93a9d23b473bfe7-modules-hds/modules/hds/ 0000775 0000000 0000000 00000000000 13434601454 0024137 5 ustar 00root root 0000000 0000000 woob-d0a72914b1b13c7766ca764ce93a9d23b473bfe7-modules-hds/modules/hds/__init__.py 0000664 0000000 0000000 00000000067 13434601454 0026253 0 ustar 00root root 0000000 0000000 from .module import HDSModule
__all__ = ['HDSModule']
woob-d0a72914b1b13c7766ca764ce93a9d23b473bfe7-modules-hds/modules/hds/browser.py 0000664 0000000 0000000 00000003446 13434601454 0026203 0 ustar 00root root 0000000 0000000 # -*- coding: utf-8 -*-
# Copyright(C) 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 .pages import ValidationPage, HomePage, HistoryPage, StoryPage, AuthorPage
# Browser
class HDSBrowser(PagesBrowser):
BASEURL = 'http://histoires-de-sexe.net'
validation_page = URL('^/$', ValidationPage)
home = URL(r'/menu.php', HomePage)
history = URL(r'/sexe/histoires-par-date.php\?p=(?P\d+)', HistoryPage)
story = URL(r'/sexe.php\?histoire=(?P.+)', StoryPage)
author = URL(r'/fiche.php\?auteur=(?P.+)', AuthorPage)
def iter_stories(self):
n = 1
self.history.go(pagenum=n)
while self.page.get_numerous() == n:
for story in self.page.iter_stories():
yield story
n += 1
self.history.go(pagenum=n)
def get_story(self, id):
self.story.go(id=id)
assert self.story.is_here()
return self.page.get_story()
def get_author(self, name):
self.author.go(name=name)
assert self.author.is_here()
return self.page.get_author()
woob-d0a72914b1b13c7766ca764ce93a9d23b473bfe7-modules-hds/modules/hds/favicon.png 0000664 0000000 0000000 00000002467 13434601454 0026303 0 ustar 00root root 0000000 0000000 PNG
IHDR @ @ iq sRGB bKGD f p pHYs tIME4O tEXtComment Created with GIMPW IDATx[lUEPЦE[+RUT"xwf*16UThb'
jiC,%*}ьJB4!>h/!*XBP"UPp|pd2g=͚:3=fC$D"H$D"H$Gbs5ܨ?'5o @B`-X\4ORb
V a/'@
0h>%N˝vkΓ6ɪ8|%3T9i3-0*ퟑs<8zN[w
Qڀt;a%[LWt>kpByYxvMڳGb촘,fL+qqŶ5 ~'*4.`