Merge pull request #2686 from iptv-org/belleza-addition

[nostv.pt] Fix scraping
This commit is contained in:
PopeyeTheSai10r 2025-02-16 10:44:29 -08:00 committed by GitHub
commit a5a305e654
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View file

@ -6,7 +6,7 @@ dayjs.extend(utc)
const headers = {
'X-Apikey': 'xe1dgrShwdR1DVOKGmsj8Ut4QLlGyOFI',
'X-Core-Appversion': '2.14.0.1',
'X-Core-Appversion': '2.20.0.3',
'X-Core-Contentratinglimit': '0',
'X-Core-Deviceid': '',
'X-Core-Devicetype': 'web',
@ -19,7 +19,7 @@ module.exports = {
site: 'nostv.pt',
days: 2,
url({ channel, date }) {
return `https://tyr-prod.apigee.net/nostv/ott/schedule/range/contents/guest?channels=${
return `https://api.clg.nos.pt/nostv/ott/schedule/range/contents/guest?channels=${
channel.site_id
}&minDate=${date.format('YYYY-MM-DD')}T00:00:00Z&maxDate=${date.format(
'YYYY-MM-DD'
@ -51,7 +51,7 @@ module.exports = {
async channels() {
const result = await axios
.get(
`https://tyr-prod.apigee.net/nostv/ott/channels/guest?client_id=${headers['X-Apikey']}`,
`https://api.clg.nos.pt/nostv/ott/channels/guest?client_id=${headers['X-Apikey']}`,
{ headers }
)
.then(r => r.data)

View file

@ -16,7 +16,7 @@ const channel = {
it('can generate valid url', () => {
expect(url({ channel, date })).toBe(
'https://tyr-prod.apigee.net/nostv/ott/schedule/range/contents/guest?channels=510&minDate=2023-12-11T00:00:00Z&maxDate=2023-12-11T23:59:59Z&isDateInclusive=true&client_id=xe1dgrShwdR1DVOKGmsj8Ut4QLlGyOFI'
'https://api.clg.nos.pt/nostv/ott/schedule/range/contents/guest?channels=510&minDate=2023-12-11T00:00:00Z&maxDate=2023-12-11T23:59:59Z&isDateInclusive=true&client_id=xe1dgrShwdR1DVOKGmsj8Ut4QLlGyOFI'
)
})