Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/benzhaomin/franck

Python 3 library, API and CLI to get download links from video pages on Jeuxvideo.com.
https://github.com/benzhaomin/franck

defunct old-project

Last synced: about 2 months ago
JSON representation

Python 3 library, API and CLI to get download links from video pages on Jeuxvideo.com.

Awesome Lists containing this project

README

        

# franck

Python 3 library, API and CLI to get download links from video pages on Jeuxvideo.com.

## Installing

- Source: clone the repo, ```cd``` into it, ```python setup.py install```
- Arch Linux: get the [PKGBUILD](pkg/archlinux/PKGBUILD), ```makepkg```, ```sudo pacman -U pkg```

## Video

The sole model of franck, videos. A basic usage would look like:
```
v = Video("http://www.jeuxvideo.com/somevideopage")
v.load()

print(v.json.title)

print(v.get_best_quality())
```

## API

Two functions are available to find videos at a single URL:
- video(url): use on single video page, containing a video player
- videos(url): use on video lists or any page with links to video pages

## Cache

Each video requires two files to be retrieved: its video page (HTML) and its config file (XML).

Web requests use a local cache with its own expiration policy. Jeuxvideo.com HTTP headers can't be relied upon as they expire immediately.

Cached files go under ```user_cache_dir/Franck```, eg. ```"/home/user/.cache/Franck/"```

## Crawler

The crawler can be used to heat up the cache with all video pages of a section.
It returns all the video page url found in a whole section, those pages can then be loaded/cached and their associated config file too.

# franck-http

The http module contains two parts:

- a JSON API to get a list of videos with cover and details found at a given URL
- an HTML page to query that API, display results and an inline video player.

More details at [http/README.md](http/README.md)

# franck-cli

CLI API to get the download URL of one of more videos from an URL.

More details at [cli/README.md](cli/README.md)

# License

> Franck, a Python 3 library, API and CLI to get download links from video pages on Jeuxvideo.com.
> Copyright (C) 2015 Benjamin Maisonnas

> This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License version 3 as published by
the Free Software Foundation.

> This program 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 General Public License for more details.

> You should have received a copy of the GNU General Public License
along with this program. If not, see .