Optimize mncvision.id grabber connection.

Currently while fetching guide for every channels, there will be one additional
connection used to set the language cookie. This optimization change this behaviour
by setting the language cookie once and then use those cookie for the rest of the
channels unless there's change in channel language.

Assume there are 10 channels and each channel only use one connection. Before the
optimization the connections made are 20 (1 for guide fetch, 1 for set language,
then multiplied by 10), and after the optimization the connections made are 11
(1 for set language, 1 for guide fetch multiplied by 10).

Signed-off-by: Toha <tohenk@yahoo.com>
This commit is contained in:
Toha
2023-11-21 22:42:02 +07:00
parent 35272ea0a4
commit f0cadf182e
7 changed files with 459 additions and 1425 deletions

View File

@@ -5,17 +5,17 @@
<div id="id-schedule-detail" class="tm-sinopsys-container">
<h2 class='page-header title text-info program-title'>Adventures With Miao Mi, Ep 1</h2>
<div class='text-warning showtime'><b>05 Oct 2022, 12:00 AM</b><br><small class="showtime-range">00:00 - 00:06 [duration:00:06]</small></div>
<h2 class='page-header title text-info program-title'>Blue Bloods S13, Ep 19</h2>
<div class='text-warning showtime'><b>19 Nov 2023, 12:15 AM</b><br><small class="showtime-range">00:15 - 01:05 [duration:00:50]</small></div>
<blockquote class="bloquet synopsis">
When children begin to disappear, a group of young kids have to face their biggest fears when they square off against a murderous, evil clown. </blockquote>
Jamie partners with the FDNY to find the arsonist responsible for a massive fire at an NYPD evidence storage facility. </blockquote>
<div class="tm-channel-info">
<img class="tm-channel-image" src="userfiles/image/channel/miawme150x150.jpg" alt="Miao Mi" title="Miao Mi #channel:38" />
<img class="tm-channel-image" src="userfiles/image/channel/axn_150x150.jpg" alt="AXN" title="AXN #channel:154" />
<div class='tm-channel-label'>
<span class='tm-channel-label'>
Channel <span class='tm-channel-no'>38</span>
Channel <span class='tm-channel-no'>154</span>
</span>
</div>