Open lukaszmn opened 2 years ago
Hi @lukaszmn,
Thanks for creating the issue. I wasn't aware of the API provided by FilmWeb. While the web scraping based solution still works for me (cf. attached screenshot), I think it's a great idea to switch to use the API. Do you know if there is an endpoint to do the film search? We need to have the film ID in order to fetch the rating. Otherwise, we could use http://www.filmweb.pl/search/live?q=nazwa
as suggested at https://kodi.org.pl/forum/7-xbmc-toolbox-xtb/2612-filmweb-api/
So for http://www.filmweb.pl/search/live?q=%C5%81owca%20Jeleni
, it returns search results:
f\c1045\c/10/45/1045/7563795.6.jpg\cThe Deer Hunter\cĹowca jeleni\cĐОвоŃŃŃ Đ˝Đ° оНони\c1978\cRobert De Niro, John Cazale\af\c734\c/07/34/734/7899618.6.jpg\cBlade Runner\cĹowca androidĂłw\cĐНоКд Đ ŃĐ˝ŃŃ\c1982\cHarrison Ford, Rutger Hauer\af\c600541\c/05/41/600541/7450957.6.jpg\cSnow White and the Huntsman\cKrĂłlewna ĹnieĹźka i Ĺowca\cХноМанка и НОвоŃŃŃ\c2012\cKristen Stewart, Chris Hemsworth\af\c684721\c/47/21/684721/7729202.6.jpg\cThe Huntsman: Winter's War\cĹowca i KrĂłlowa Lodu\cاŮŘľŮاد: Řعب اŮشتاإ\c2016\cChris Hemsworth, Charlize Theron\af\c15\c/00/15/15/7046391.6.jpg\cBlade\cBlade - Wieczny Ĺowca\cĐНоКд\c1998\cWesley Snipes, Stephen Dorff\af\c644817\c/48/17/644817/7707670.6.jpg\cThe Last Witch Hunter\cĹowca czarownic\cؾا،د اŮساŘعات ا؎ŮŘą\c2015\cVin Diesel, Rose Leslie\ap\c163454\c/34/54/163454/452568.2.jpg\cAllen Leech\c2\c6\cDownton Abbey 2010\c\af\c4225\c/42/25/4225/7538074.6.jpg\cBlade II\cBlade: Wieczny Ĺowca II\cĐНоКд 2\c2002\cWesley Snipes, Kris Kristofferson\af\c563280\c/32/80/563280/7560112.6.jpg\cAbraham Lincoln: Vampire Hunter\cAbraham Lincoln: Ĺowca wampirĂłw 3D\cĐКйŃĐ°Ń
Đ°Đź ĐинкŃНн: ĐОвоŃŃŃ Đ˝Đ° ваПпиŃи\c2012\cBenjamin Walker, Dominic Cooper\af\c33417\c/34/17/33417/7535667.6.jpg\cDreamcatcher\cĹowca snĂłw\cPavuÄina snĹŻ\c2003\cMorgan Freeman, Thomas Jane
The 1045 in the beginning is the ID I was looking for. So it seems to be a good starting point in order to ditch web scraping.
I'm afraid it's not working, film ratings are not contained in the results page but have to be requested with API:
https://www.filmweb.pl/api/v1/film/<ID>/rating