Name | python_filmaffinity_fork JSON |
Version |
0.0.20
JSON |
| download |
home_page | None |
Summary | Simple python scraping for the FilmAffinity. |
upload_time | 2024-05-04 21:51:16 |
maintainer | None |
docs_url | None |
author | Your Name |
requires_python | <3.13,>=3.10 |
license | None |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
*******************
Python FilmAffinity
*******************
This is a simple python scraping for the FilmAffinity.
.. image:: https://github.com/sergiormb/python_filmaffinity/workflows/Tests/badge.svg?branch=master
:target: https://github.com/sergiormb/python_filmaffinity/actions/workflows/python-test.yml?query=branch%3Amaster
.. image:: https://img.shields.io/github/license/mashape/apistatus.svg
:target: https://github.com/sergiormb/python_filmaffinity/blob/master/LICENSE.rst
.. image:: https://img.shields.io/pypi/pyversions/Django.svg
:target: https://pypi.python.org/pypi/python_filmaffinity/
.. image:: https://readthedocs.org/projects/python-filmaffinity/badge/?version=latest
:target: http://python-filmaffinity.readthedocs.io/en/latest/?badge=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
requests-cache >= 0.4.13
bs4 >= 0.0.1
Examples
========
.. code-block:: python
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
.. code-block:: python
import python_filmaffinity
service = python_filmaffinity.FilmAffinity(lang='en')
search
******
+-----------+----------+--------+-----------------------------------+
| Parameter | Required | Type | Description |
+===========+==========+========+===================================+
| title | False | String | Search for the title of the movie |
+-----------+----------+--------+-----------------------------------+
| cast | False | String | Search movies by actor |
+-----------+----------+--------+-----------------------------------+
| director | False | String | Search movies by the director |
+-----------+----------+--------+-----------------------------------+
| from_year | False | String | Search start date |
+-----------+----------+--------+-----------------------------------+
| to_year | False | String | Search end date |
+-----------+----------+--------+-----------------------------------+
- Example
.. code-block:: python
movies = service.search(cast='Nicolas Cage')
get_movie
*********
+-----------+----------+--------+-----------------------------------+
| Parameter | Required | Type | Description |
+===========+==========+========+===================================+
| id | False | String | FilmAffinity id |
+-----------+----------+--------+-----------------------------------+
| title | False | String | Get movie by title |
+-----------+----------+--------+-----------------------------------+
| trailer | False | Boolean| Return movie with trailer |
+-----------+----------+--------+-----------------------------------+
| images | False | Boolean| Return movie with images |
+-----------+----------+--------+-----------------------------------+
- Example
.. code-block:: python
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
.. code-block:: python
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
.. code-block:: python
movies = service.top_premieres()
top_netflix, top_hbo, top_filmin, top_movistar, top_rakuten, top_tv_series
**************************************************************************
+-----------+----------+--------+-----------------------------------+
| Parameter | Required | Type | Description |
+===========+==========+========+===================================+
| top | False | Integer| Number of elements |
+-----------+----------+--------+-----------------------------------+
- Example
.. code-block:: python
movies = service.top_netflix()
movies = service.top_hbo(top=5)
movies = service.top_filmin()
movies = service.top_movistar()
movies = service.top_rakuten()
movies = service.top_tv_series()
recommend HBO, Netflix, Filmin, Movistar, Rakuten
*************************************************
+-----------+----------+--------+-----------------------------------+
| Parameter | Required | Type | Description |
+===========+==========+========+===================================+
| trailer | False | Boolean| Return movie with trailer |
+-----------+----------+--------+-----------------------------------+
| images | False | Boolean| Return movie with images |
+-----------+----------+--------+-----------------------------------+
- Example
.. code-block:: python
movies = service.recommend_netflix()
movies = service.recommend_hbo()
movies = service.recommend_filmin()
movies = service.recommend_movistar()
movies = service.recommend_rakuten()
Changelog
=========
v0.0.20 (28-09-2023)
********************
- Scrapping updated
v0.0.19 (22-06-2021)
********************
- Fixed errors in get_country
v0.0.18 (26-02-2021)
********************
- When images are requested, lets provide also the country where
they were published (@jcea)
- Correctly provide the trailers listed in filmaffinity (@jcea)
- Spurious search in youtube deleted (@jcea)
- Extract correctly when multiple genres (@jcea)
- Added "writers", "music", "cinematography" and "producers" (@jcea)
- Regression processing "original_title" in searches (@jcea)
v0.0.17 (18-02-2021)
********************
- Deleted spaces at the end of the title (@jcea)
- Added original_title (@jcea)
- Fix directors scraping (@jcea)
v0.0.15 (03-08-2020)
********************
- Search by genre
v0.0.14 (08-09-2018)
********************
- Fixed errors
v0.0.13 (07-09-2018)
********************
- Adds proxies and random user-agent in headers
v0.0.12 (27-08-2018)
********************
- Changed description
v0.0.11 (27-08-2018)
********************
- Fixed errors
v0.0.1O (27-08-2018)
********************
- Fixed errors with SSL
v0.0.09 (28-12-2017)
********************
- Replaces cachetools for requests-cache
v0.0.8 (26-12-2017)
*******************
- Add images
- Fixed errors
v0.0.7 (15-12-2017)
*******************
- Fixes encoding for the analyzed results
- Disabled limitations for all the supported languages
- Change of name to the main class.
- Adds initial language check and raise error if this is not in support
- Adds basic exceptions
v0.0.6 (12-06-2017)
*******************
- Add cachetools
v0.0.5 (13-06-2017)
*******************
- Fixed errors
v0.0.4 (11-06-2017)
*******************
- Top new DVDs
- Get movie with trailer
- Top TV series
- Return movies list with raiting
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
====
- Sergio Pino, sergiormb88@gmail.com, `sergiormb.github.io <https://sergiormb.github.io>`_
Collaborators
=============
- opacam https://github.com/opacam
- jcea - https://www.jcea.es/ - https://blog.jcea.es/ - https://github.com/jcea
License
=======
The MIT License (MIT)
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.
Raw data
{
"_id": null,
"home_page": null,
"name": "python_filmaffinity_fork",
"maintainer": null,
"docs_url": null,
"requires_python": "<3.13,>=3.10",
"maintainer_email": null,
"keywords": null,
"author": "Your Name",
"author_email": "you@example.com",
"download_url": "https://files.pythonhosted.org/packages/4d/3a/4a80caac1e63f5186a6da2275b7f549629eed47b5a145b6f4254bda0df98/python_filmaffinity_fork-0.0.20.tar.gz",
"platform": null,
"description": "*******************\nPython FilmAffinity\n*******************\nThis is a simple python scraping for the FilmAffinity.\n\n\n.. image:: https://github.com/sergiormb/python_filmaffinity/workflows/Tests/badge.svg?branch=master\n :target: https://github.com/sergiormb/python_filmaffinity/actions/workflows/python-test.yml?query=branch%3Amaster\n.. image:: https://img.shields.io/github/license/mashape/apistatus.svg \n :target: https://github.com/sergiormb/python_filmaffinity/blob/master/LICENSE.rst\n.. image:: https://img.shields.io/pypi/pyversions/Django.svg \n :target: https://pypi.python.org/pypi/python_filmaffinity/\n.. image:: https://readthedocs.org/projects/python-filmaffinity/badge/?version=latest\n :target: http://python-filmaffinity.readthedocs.io/en/latest/?badge=latest\n\n\nInstallation\n============\n\nPip\n***\n::\n\n pip install python-filmaffinity\n\n\nFrom Source\n***********\n\n::\n\n git clone git@github.com:sergiormb/python_filmaffinity.git\n cd python_filmaffinity\n python setup.py install\n\n\nRequirements\n**********************\n\n::\n\n requests >= 2.0.1\n requests-cache >= 0.4.13\n bs4 >= 0.0.1\n\n\nExamples\n========\n\n.. code-block:: python\n\n import python_filmaffinity\n service = python_filmaffinity.FilmAffinity()\n movie = service.get_movie(title='Celda 211')\n movie['title']\n Celda 211\n movie['rating']\n 7.7\n movie['directors']\n ['Daniel Monz\u00f3n']\n movie['actors']\n ['Luis Tosar', 'Alberto Ammann', 'Antonio Resines', 'Carlos Bardem', 'Marta Etura', 'Vicente Romero', 'Manuel Mor\u00f3n', 'Manolo Solo', 'Fernando Soto', 'Luis Zahera', 'Patxi Bisquert', 'F\u00e9lix Cubero', 'Josean Bengoetxea', 'Juan Carlos Mangas', 'Jes\u00fas Carroza']\n\n\nUsage\n=====\n\nlanguage\n********\n\n- Spanish: 'es'\n- USA, UK: 'en'\n- M\u00e9xico: 'mx'\n- Argentina: 'ar'\n- Chile: 'cl'\n- Colombia: 'co'\n\n\n- Example\n\n.. code-block:: python\n\n import python_filmaffinity\n service = python_filmaffinity.FilmAffinity(lang='en')\n\n\nsearch\n******\n\n+-----------+----------+--------+-----------------------------------+\n| Parameter | Required | Type | Description |\n+===========+==========+========+===================================+\n| title | False | String | Search for the title of the movie |\n+-----------+----------+--------+-----------------------------------+\n| cast | False | String | Search movies by actor |\n+-----------+----------+--------+-----------------------------------+\n| director | False | String | Search movies by the director |\n+-----------+----------+--------+-----------------------------------+\n| from_year | False | String | Search start date |\n+-----------+----------+--------+-----------------------------------+\n| to_year | False | String | Search end date |\n+-----------+----------+--------+-----------------------------------+\n\n- Example\n\n.. code-block:: python\n\n movies = service.search(cast='Nicolas Cage')\n\n\nget_movie\n*********\n\n+-----------+----------+--------+-----------------------------------+\n| Parameter | Required | Type | Description |\n+===========+==========+========+===================================+\n| id | False | String | FilmAffinity id |\n+-----------+----------+--------+-----------------------------------+\n| title | False | String | Get movie by title |\n+-----------+----------+--------+-----------------------------------+\n| trailer | False | Boolean| Return movie with trailer |\n+-----------+----------+--------+-----------------------------------+\n| images | False | Boolean| Return movie with images |\n+-----------+----------+--------+-----------------------------------+\n\n- Example\n\n.. code-block:: python\n\n movies = service.get_movie(title='Avatar')\n movies = service.get_movie(id='495280')\n\n\ntop_filmaffinity\n****************\n\n+-----------+----------+--------+-----------------------------------+\n| Parameter | Required | Type | Description |\n+===========+==========+========+===================================+\n| from_year | False | String | Search start date |\n+-----------+----------+--------+-----------------------------------+\n| to_year | False | String | Search end date |\n+-----------+----------+--------+-----------------------------------+\n| top | False | Integer| Number of elements |\n+-----------+----------+--------+-----------------------------------+\n\n- Example\n\n.. code-block:: python\n\n movies = service.top_filmaffinity()\n movies = service.top_filmaffinity(from_year=2010, to_year=2011)\n\n\ntop_premieres\n*************\n\n+-----------+----------+--------+-----------------------------------+\n| Parameter | Required | Type | Description |\n+===========+==========+========+===================================+\n| top | False | Integer| Number of elements |\n+-----------+----------+--------+-----------------------------------+\n\n- Example\n\n.. code-block:: python\n\n movies = service.top_premieres()\n\n\ntop_netflix, top_hbo, top_filmin, top_movistar, top_rakuten, top_tv_series\n**************************************************************************\n\n+-----------+----------+--------+-----------------------------------+\n| Parameter | Required | Type | Description |\n+===========+==========+========+===================================+\n| top | False | Integer| Number of elements |\n+-----------+----------+--------+-----------------------------------+\n\n- Example\n\n.. code-block:: python\n\n movies = service.top_netflix()\n movies = service.top_hbo(top=5)\n movies = service.top_filmin()\n movies = service.top_movistar()\n movies = service.top_rakuten()\n movies = service.top_tv_series()\n\n\nrecommend HBO, Netflix, Filmin, Movistar, Rakuten\n*************************************************\n\n+-----------+----------+--------+-----------------------------------+\n| Parameter | Required | Type | Description |\n+===========+==========+========+===================================+\n| trailer | False | Boolean| Return movie with trailer |\n+-----------+----------+--------+-----------------------------------+\n| images | False | Boolean| Return movie with images |\n+-----------+----------+--------+-----------------------------------+\n\n- Example\n\n.. code-block:: python\n\n movies = service.recommend_netflix()\n movies = service.recommend_hbo()\n movies = service.recommend_filmin()\n movies = service.recommend_movistar()\n movies = service.recommend_rakuten()\n\n\nChangelog\n=========\nv0.0.20 (28-09-2023)\n********************\n\n- Scrapping updated\n\nv0.0.19 (22-06-2021)\n********************\n\n- Fixed errors in get_country\n\nv0.0.18 (26-02-2021)\n********************\n\n- When images are requested, lets provide also the country where\n they were published (@jcea)\n- Correctly provide the trailers listed in filmaffinity (@jcea)\n- Spurious search in youtube deleted (@jcea)\n- Extract correctly when multiple genres (@jcea)\n- Added \"writers\", \"music\", \"cinematography\" and \"producers\" (@jcea)\n- Regression processing \"original_title\" in searches (@jcea)\n\nv0.0.17 (18-02-2021)\n********************\n\n- Deleted spaces at the end of the title (@jcea)\n- Added original_title (@jcea)\n- Fix directors scraping (@jcea)\n\nv0.0.15 (03-08-2020)\n********************\n\n- Search by genre\n\nv0.0.14 (08-09-2018)\n********************\n\n- Fixed errors\n\nv0.0.13 (07-09-2018)\n********************\n\n- Adds proxies and random user-agent in headers\n\nv0.0.12 (27-08-2018)\n********************\n\n- Changed description\n\nv0.0.11 (27-08-2018)\n********************\n\n- Fixed errors\n\nv0.0.1O (27-08-2018)\n********************\n\n- Fixed errors with SSL\n\nv0.0.09 (28-12-2017)\n********************\n\n- Replaces cachetools for requests-cache\n\nv0.0.8 (26-12-2017)\n*******************\n\n- Add images\n- Fixed errors\n\nv0.0.7 (15-12-2017)\n*******************\n\n- Fixes encoding for the analyzed results\n- Disabled limitations for all the supported languages\n- Change of name to the main class.\n- Adds initial language check and raise error if this is not in support\n- Adds basic exceptions\n\nv0.0.6 (12-06-2017)\n*******************\n\n- Add cachetools\n\nv0.0.5 (13-06-2017)\n*******************\n\n- Fixed errors\n\nv0.0.4 (11-06-2017)\n*******************\n\n- Top new DVDs\n- Get movie with trailer\n- Top TV series\n- Return movies list with raiting\n\n\nv0.0.3 (10-06-2017)\n*******************\n\n- Top Netlfix, HBO and Filmin\n- Recommendation from Netflix, HBO or Filmin\n- Fixed errors\n\n\nv0.0.2 (31-05-2017)\n*******************\n\n- Search movies by title, year, director or cast.\n- Get the filmaffinity top and search by year\n- Get the premieres top\n\n\nv0.0.1 (29-05-2017)\n*******************\n\n- Initial release.\n\n\nAuthors\n*******\n\n\nLead\n====\n\n- Sergio Pino, sergiormb88@gmail.com, `sergiormb.github.io <https://sergiormb.github.io>`_\n\nCollaborators\n=============\n\n- opacam https://github.com/opacam\n- jcea - https://www.jcea.es/ - https://blog.jcea.es/ - https://github.com/jcea\n\nLicense\n=======\n\nThe MIT License (MIT)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n",
"bugtrack_url": null,
"license": null,
"summary": "Simple python scraping for the FilmAffinity.",
"version": "0.0.20",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "495a0c8aa9943b974eabaea982cbbdd122632e8af5486238a00cf4a108828db5",
"md5": "ea8015636eb1341098118db75f36c30d",
"sha256": "22ee45cf95d0fc6bc483b288074f247b2f44410bb5a99461bddea9f564c8f7b5"
},
"downloads": -1,
"filename": "python_filmaffinity_fork-0.0.20-py3-none-any.whl",
"has_sig": false,
"md5_digest": "ea8015636eb1341098118db75f36c30d",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<3.13,>=3.10",
"size": 2207196,
"upload_time": "2024-05-04T21:51:13",
"upload_time_iso_8601": "2024-05-04T21:51:13.321394Z",
"url": "https://files.pythonhosted.org/packages/49/5a/0c8aa9943b974eabaea982cbbdd122632e8af5486238a00cf4a108828db5/python_filmaffinity_fork-0.0.20-py3-none-any.whl",
"yanked": true,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "4d3a4a80caac1e63f5186a6da2275b7f549629eed47b5a145b6f4254bda0df98",
"md5": "517e914e01c42979ba0fd8d8875c22eb",
"sha256": "fa188b42b8901a503d9184790b9242e995cee69151f9e1b0c22ed228bd11f1a6"
},
"downloads": -1,
"filename": "python_filmaffinity_fork-0.0.20.tar.gz",
"has_sig": false,
"md5_digest": "517e914e01c42979ba0fd8d8875c22eb",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<3.13,>=3.10",
"size": 2184259,
"upload_time": "2024-05-04T21:51:16",
"upload_time_iso_8601": "2024-05-04T21:51:16.545036Z",
"url": "https://files.pythonhosted.org/packages/4d/3a/4a80caac1e63f5186a6da2275b7f549629eed47b5a145b6f4254bda0df98/python_filmaffinity_fork-0.0.20.tar.gz",
"yanked": true,
"yanked_reason": null
}
],
"upload_time": "2024-05-04 21:51:16",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "python_filmaffinity_fork"
}