Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mncvision.id EPG only captures tv shows in first page #523

Closed
F640 opened this issue Feb 18, 2022 · 10 comments · Fixed by #577 or #1156
Closed

mncvision.id EPG only captures tv shows in first page #523

F640 opened this issue Feb 18, 2022 · 10 comments · Fixed by #577 or #1156
Labels
broken guide There's a problem with the guide

Comments

@F640
Copy link
Contributor

F640 commented Feb 18, 2022

Hello, i have just noticed that mncvision.id EPG does not capture any shows in second page and onwards.

Basically, it only captures 50 first programs each day.

@freearhey freearhey added bug Something isn't working mncvision.id labels Feb 18, 2022
@F640
Copy link
Contributor Author

F640 commented Feb 25, 2022

After playing around with this site, i have found way to fix this.

  • Some channels in this schedule (For example Miao Mi, Nickelodeon, Nick Junior, and CBeebies) will have 2 pages or more if there is more than 50 TV shows in one day. If so, a new div element with class box well appeared which contains page navigation.
  • Each time you move to next page or previous page the URL changed to www.mncvision.id/schedule/table/startno/{50 multiplication}. {50 multiplication} means where the site have to start the TV show from. if the value is 50, it will show 51st TV shows until 100, 101 to 150, and so on. If it start from numbers higher than or the same number of TV shows in a day it will give this error "Maaf.. data jadwal acara tidak ada", otherwise if the channel has only single page, it will show nothing (not even that error).
  • This site uses cookies to store channels you have checked last time (likely for convenience).

But i am stuck at making config to do this. Can anyone help me?

@RevGear
Copy link
Contributor

RevGear commented Feb 25, 2022

Config will need to be changed to use a GET rather than a POST. If you specify the startno then a POST will ignore that and always go back to the first page of results.

https://mncvision.id/schedule/table/startno/0 will work for the first page, meaning the variable URL will be a bit easier to deal with.

It's something of an ugly hack but you could set page = 0 and get https://mncvision.id/schedule/table/startno/{50 * page}. Process the returned items, increment page and repeat. If items count = 0 then exit and move on to the next channel. Downside is that doesn't check if there actually is a second page so you end up doing an extra GET for no reason. Potentially you could check the number of items returned and only repeat for the next page is item count = 50. If it's 49 or less then you know there can't be another page.

@F640
Copy link
Contributor Author

F640 commented Feb 26, 2022

https://mncvision.id/schedule/table/startno/0 will work for the first page, meaning the variable URL will be a bit easier to deal with.

This trick will work for for channels with two or more pages, but will not work for channels with single page (majority channels in this schedule has only single page). Single page channel must be captured from https://mncvision.id/schedule/table, otherwise it will blank if never chosen any channel yet.

@RevGear
Copy link
Contributor

RevGear commented Feb 26, 2022

This trick will work for for channels with two or more pages

Well spotted. I'd checked the startno/0 worked but didn't check it worked if there weren't multiple pages

@F640
Copy link
Contributor Author

F640 commented Feb 27, 2022

Config will need to be changed to use a GET rather than a POST. If you specify the startno then a POST will ignore that and always go back to the first page of results.

After considering this one further, i just stop work on this fix. I am a coding noobie either.

@freearhey freearhey self-assigned this Mar 5, 2022
@freearhey freearhey added wip Work in Progress and removed help wanted labels Mar 5, 2022
@freearhey
Copy link
Collaborator

Fixed via #577

@freearhey freearhey removed the wip Work in Progress label Mar 5, 2022
@freearhey freearhey removed their assignment Mar 5, 2022
@freearhey freearhey reopened this Apr 7, 2022
@F640
Copy link
Contributor Author

F640 commented May 8, 2022

Already an old news and noticed it for long time, but this issue happened randomly now after next scraping.

@BellezaEmporium
Copy link
Contributor

BellezaEmporium commented May 10, 2022

@freearhey I think you should look after the page number down below. If you manage to grab the page number for each iteration, you're good to go (and it should fix the EPG for a while).

P.S : if you actually remove the "startno/0" parameter, you still can see the EPG, and it gives a full day stream.
https://mncvision.id/schedule/table

image

@F640
Copy link
Contributor Author

F640 commented May 11, 2022

P.S : if you actually remove the "startno/0" parameter, you still can see the EPG, and it gives a full day stream. https://mncvision.id/schedule/table

image

Won't work if you set to channels that usually has 2 or more pages, for example: Miao Mi, France 24 English, Nickelodeon Asia, and Nick Jr. Asia.

P.S : If it has multiple pages, you can set "startno" to any number you want as long as its value doesn't exceed total shows in one channel and a day.

@freearhey freearhey added broken guide There's a problem with the guide and removed bug Something isn't working labels Sep 19, 2022
@freearhey freearhey added the wip Work in Progress label Oct 4, 2022
@freearhey
Copy link
Collaborator

Fixed in #1156

@freearhey freearhey removed the wip Work in Progress label Oct 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
broken guide There's a problem with the guide
Development

Successfully merging a pull request may close this issue.

4 participants