Update fptplay.py

This commit is contained in:
MrHulk 2024-09-12 14:04:38 +05:30 committed by GitHub
parent 017bbfe491
commit 74a969dc74
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,11 +1,13 @@
import hashlib import hashlib
import time import time
import urllib.parse import urllib.parse
from .common import InfoExtractor from .common import InfoExtractor
from ..utils import ( from ..utils import (
ExtractorError, ExtractorError,
int_or_none, int_or_none,
) )
class FptplayIE(InfoExtractor): class FptplayIE(InfoExtractor):
_VALID_URL = r'https?://fptplay\.vn/xem-video/[^/]+\-(?P<id>[a-f0-9]+)' _VALID_URL = r'https?://fptplay\.vn/xem-video/[^/]+\-(?P<id>[a-f0-9]+)'
_GEO_COUNTRIES = ['VN'] _GEO_COUNTRIES = ['VN']
@ -59,7 +61,7 @@ def _real_extract(self, url):
else: else:
# playlist # playlist
entries = [] entries = []
for episode in res['result']['episodes']: for episode in res['result']['episodes']:
if episode['is_trailer'] == 1: if episode['is_trailer'] == 1:
continue continue
manifest = self._download_json(self.get_api_with_st_token(contentId, episode['_id']), episode['_id'], headers={'authorization': f'Bearer {token.value}'}, expected_status=406) manifest = self._download_json(self.get_api_with_st_token(contentId, episode['_id']), episode['_id'], headers={'authorization': f'Bearer {token.value}'}, expected_status=406)