Make CapCollection understandable and useable by humans
* Make the declaration of fct and it in the constructor Collection, instead of adding them from the outside * Add a function to flatten a list containing collection (solves the radioob search crash) * Better display of collections in the "ls" command (and display both id and title) * The "cd" command goes to the root of the path (like the UNIX cd) * Move the Video object of canalplus in a correct path * Make Collection iterable * Add comments to CapCollection * Cache the result of fct in a Collection; it is only called once * CollectionNotFound errors can be more explicit by providing a path * Require utf-8 in collection paths * Code cleanups
This commit is contained in:
parent
10215d1e4c
commit
682e14c86a
14 changed files with 125 additions and 63 deletions
|
|
@ -23,7 +23,7 @@ from datetime import datetime
|
|||
from weboob.capabilities.base import NotAvailable
|
||||
from weboob.tools.capabilities.thumbnail import Thumbnail
|
||||
from weboob.tools.browser import BasePage
|
||||
from .video import CanalplusVideo
|
||||
from ..video import CanalplusVideo
|
||||
|
||||
|
||||
__all__ = ['VideoPage']
|
||||
|
|
@ -78,7 +78,7 @@ class VideoPage(BasePage):
|
|||
|
||||
def iter_channel(self):
|
||||
for vid in self.document.getchildren():
|
||||
yield self.parse_video_channel(vid)
|
||||
yield self.parse_video_channel(vid)
|
||||
|
||||
def parse_video_channel(self,el):
|
||||
_id = el[0].text
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue