Help creating "Next Page" function. - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32) +--- Forum: Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=26) +--- Thread: Help creating "Next Page" function. (/showthread.php?tid=312839) |
Help creating "Next Page" function. - synnc - 2017-04-21 Hello guys, I need implement a "Next Page" function. The website im scrapping has in some categories multiple pages and only has 24 items per page, so i get the url of the next page. But now since i have the next page url, how i call the same function to deal with the same data but only on a different page. (Maybe to make my function recursive?) And how i call the function on the "Next Page" Directory? Or whats the better aproach to implement a next page functionality, on a multipage website? Quick brief, lets say: Im on this page "www.lol.com/1" and has 24 videos, and the link to the next page where there has more 24, and this goes on about 20 pages. I grab the link "www.lol.com/2" on the first page, but how i call the same function to deal with scrapping of the page 2? And how to implement it on "Next page" directory created by xbmcplugin.addDirectoryItem? Here's my code at the moment: Code: def INSIDEcategorie(url): Thanks for the help. RE: Help creating "Next Page" function. - Skipmode A1 - 2017-04-21 here's a working example: https://github.com/skipmodea1/plugin.video.gamekings/blob/master/resources/lib/gamekings_list.py start with www.lol.com/1 and calculate the next one (www.lol.com/2) RE: Help creating "Next Page" function. - synnc - 2017-04-21 (2017-04-21, 18:57)Skipmode A1 Wrote: here's a working example: https://github.com/skipmodea1/plugin.video.gamekings/blob/master/resources/lib/gamekings_list.py I dont need to calculate the next one, i can scrap the link on "www.lol.com/1", my problem is how to call the same function to scrap the new page. Thanks for the example. RE: Help creating "Next Page" function. - synnc - 2017-04-23 UPDATE: I've managed to make it work. Thanks. RE: Help creating "Next Page" function. - juansebastian028 - 2021-03-20 (2017-04-23, 14:44)synnc Wrote: UPDATE: I've managed to make it work.I have the same problem, could you tell me what did you do? |