Skip to main content

Python wrapper for Filmaffinity

Project description

This is a simple python scraping for the Filmaffinity.

https://travis-ci.org/sergiormb/python_filmaffinity.svg?branch=master https://coveralls.io/repos/github/sergiormb/python_filmaffinity/badge.svg?branch=master https://img.shields.io/github/license/mashape/apistatus.svg https://img.shields.io/pypi/pyversions/Django.svg https://readthedocs.org/projects/python-filmaffinity/badge/?version=latest

Installation

Pip

pip install python_filmaffinity

From Source

git clone git@github.com:sergiormb/python_filmaffinity.git`
cd python_filmaffinity`
python setup.py install`

Requirements

requests >= 2.0.1`
bs4 >= 0.0.1`

Examples

import python_filmaffinity
service = python_filmaffinity.Filmaffinity()
movie = service.get_movie(title='Celda 211')
movie['title']
Celda 211
movie['rating']
7.7
movie['directors']
['Daniel Monzón']
movie['actors']
['Luis Tosar', 'Alberto Ammann', 'Antonio Resines', 'Carlos Bardem', 'Marta Etura', 'Vicente Romero', 'Manuel Morón', 'Manolo Solo', 'Fernando Soto', 'Luis Zahera', 'Patxi Bisquert', 'Félix Cubero', 'Josean Bengoetxea', 'Juan Carlos Mangas', 'Jesús Carroza']

Usage

language

  • Spanish: ‘es’

  • USA, UK: ‘en’

  • México: ‘mx’

  • Argentina: ‘ar’

  • Chile: ‘cl’

  • Colombia: ‘co’

  • Example

import python_filmaffinity
service = python_filmaffinity.Filmaffinity(lang='en')

get_movie

Parameter

Required

Type

Description

id

False

String

Filmaffinity id

title

False

String

Get movie by title

  • Example

movies = service.get_movie(title='Avatar')
movies = service.get_movie(id='495280')

top_filmaffinity

Parameter

Required

Type

Description

from_year

False

String

Search start date

to_year

False

String

Search end date

top

False

Integer

Number of elements

  • Example

movies = service.top_filmaffinity()
movies = service.top_filmaffinity(from_year=2010, to_year=2011)

top_premieres

Parameter

Required

Type

Description

top

False

Integer

Number of elements

  • Example

movies = service.top_premieres()

top_netflix, top_hbo, top_filmin

Parameter

Required

Type

Description

top

False

Integer

Number of elements

  • Example

movies = service.top_netflix()
movies = service.top_hbo(top=5)
movies = service.top_filmin()

recommend HBO, Netflix, Filmin

  • Example

movies = service.recommend_netflix()
movies = service.recommend_hbo()
movies = service.recommend_filmin()

Changelog

v0.0.3 (10-06-2017)

  • Top Netlfix, HBO and Filmin

  • Recommendation from Netflix, HBO or Filmin

  • Fixed errors

v0.0.2 (31-05-2017)

  • Search movies by title, year, director or cast.

  • Get the filmaffinity top and search by year

  • Get the premieres top

v0.0.1 (29-05-2017)

  • Initial release.

Authors

Lead

License

The MIT License (MIT)

Copyright (c) 2014 Derrick Gilland

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python_filmaffinity-0.0.3.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

python_filmaffinity-0.0.3-py2.py3-none-any.whl (4.8 kB view details)

Uploaded Python 2Python 3

File details

Details for the file python_filmaffinity-0.0.3.tar.gz.

File metadata

File hashes

Hashes for python_filmaffinity-0.0.3.tar.gz
Algorithm Hash digest
SHA256 8d84ba0a1dd449252f1db4e4c249187835129ad41c5155ddc216cb0e7e7d1532
MD5 64dc58054f9bb25c2b3e721f961c723e
BLAKE2b-256 0384b9551697e79b5d6bd4094125bb4a8b07afeb6fdc0fb205345fc090e73c9c

See more details on using hashes here.

File details

Details for the file python_filmaffinity-0.0.3-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for python_filmaffinity-0.0.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 af98e6c4cdfc93b50fbbc3ee7872c3e84d236775a6014d4ce0537382b74781b1
MD5 aa6418bd16deec1a15cebcf5acf61ae2
BLAKE2b-256 f909222abacb5865649358a5411510a5402945220587f8067f6500921f136963

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page