Package: python-filmaffinity
This is a simple python scraping for the FilmAffinity.InstallationPippip install python-filmaffinityFrom Sourcegit clone git@github.com:sergiormb/python_filmaffinity.git
cd python_filmaffinity
python setup.py installRequirementsrequests >= 2.0.1
requests-cache >= 0.4.13
bs4 >= 0.0.1Examplesimportpython_filmaffinityservice=python_filmaffinity.FilmAffinity()movie=service.get_movie(title='Celda 211')movie['title']Celda211movie['rating']7.7movie['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']UsagelanguageSpanish: ‘es’USA, UK: ‘en’México: ‘mx’Argentina: ‘ar’Chile: ‘cl’Colombia: ‘co’Exampleimportpython_filmaffinityservice=python_filmaffinity.FilmAffinity(lang='en')searchParameterRequiredTypeDescriptiontitleFalseStringSearch for the title of the moviecastFalseStringSearch movies by actordirectorFalseStringSearch movies by the directorfrom_yearFalseStringSearch start dateto_yearFalseStringSearch end dateExamplemovies=service.search(cast='Nicolas Cage')get_movieParameterRequiredTypeDescriptionidFalseStringFilmAffinity idtitleFalseStringGet movie by titletrailerFalseBooleanReturn movie with trailerimagesFalseBooleanReturn movie with imagesExamplemovies=service.get_movie(title='Avatar')movies=service.get_movie(id='495280')top_filmaffinityParameterRequiredTypeDescriptionfrom_yearFalseStringSearch start dateto_yearFalseStringSearch end datetopFalseIntegerNumber of elementsExamplemovies=service.top_filmaffinity()movies=service.top_filmaffinity(from_year=2010,to_year=2011)top_premieresParameterRequiredTypeDescriptiontopFalseIntegerNumber of elementsExamplemovies=service.top_premieres()top_netflix, top_hbo, top_filmin, top_movistar, top_rakuten, top_tv_seriesParameterRequiredTypeDescriptiontopFalseIntegerNumber of elementsExamplemovies=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, RakutenParameterRequiredTypeDescriptiontrailerFalseBooleanReturn movie with trailerimagesFalseBooleanReturn movie with imagesExamplemovies=service.recommend_netflix()movies=service.recommend_hbo()movies=service.recommend_filmin()movies=service.recommend_movistar()movies=service.recommend_rakuten()Changelogv0.0.19 (22-06-2021)Fixed errors in get_countryv0.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 genrev0.0.14 (08-09-2018)Fixed errorsv0.0.13 (07-09-2018)Adds proxies and random user-agent in headersv0.0.12 (27-08-2018)Changed descriptionv0.0.11 (27-08-2018)Fixed errorsv0.0.1O (27-08-2018)Fixed errors with SSLv0.0.09 (28-12-2017)Replaces cachetools for requests-cachev0.0.8 (26-12-2017)Add imagesFixed errorsv0.0.7 (15-12-2017)Fixes encoding for the analyzed resultsDisabled limitations for all the supported languagesChange of name to the main class.Adds initial language check and raise error if this is not in supportAdds basic exceptionsv0.0.6 (12-06-2017)Add cachetoolsv0.0.5 (13-06-2017)Fixed errorsv0.0.4 (11-06-2017)Top new DVDsGet movie with trailerTop TV seriesReturn movies list with raitingv0.0.3 (10-06-2017)Top Netlfix, HBO and FilminRecommendation from Netflix, HBO or FilminFixed errorsv0.0.2 (31-05-2017)Search movies by title, year, director or cast.Get the filmaffinity top and search by yearGet the premieres topv0.0.1 (29-05-2017)Initial release.AuthorsLeadSergio Pino,sergiormb88@gmail.com,sergiormb.github.ioCollaboratorsopacamhttps://github.com/opacamjcea -https://www.jcea.es/-https://blog.jcea.es/-https://github.com/jceaLicenseThe 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.