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

api/ok: fix author not being handled properly #1009

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

zjy4fun
Copy link

@zjy4fun zjy4fun commented Dec 19, 2024

closes #866

https://github.com/imputnet/cobalt/blob/main/api/src/processing/services/ok.js#L47

author may be undefined

videoData:

{
  "provider": "UPLOADED_ODKL",
  "service": "ok",
  "owner": false,
  "voted": false,
  "likeCount": 0,
  "subscribed": false,
  "isWatchLater": false,
  "slot": 690,
  "siteZone": -1,
  "showAd": true,
  "fromTime": 0,
  "author": {},
  "movie": {
    "id": "376357718731",
    "movieId": "376357718731",
    "likeId": "376357718731",
    "contentId": "340295027403",
    "poster": "https://i.okcdn.ru/videoPreview?id=340295027403&type=32&idx=13&tkn=T6Z6ADXIQZOdmr9owIB_hbz0dVk&fn=external_8",
    "duration": "4201",
    "title": "Peppa.Pig.My.First.Cinema.Experience.2017.HDRip.ShahidFirst.TV",
    "url": "https://ok.ru/video/376357718731",
    "link": "/video/376357718731",
    "collageInfo": {
      "imageType": "COLLAGE",
      "url": "https://i.okcdn.ru/videoPreview?id=340295027403&type=36&idx=0&tkn=C6WrJIVv2USi4CTmlrtc9ByIY5k",
      "frequency": 30,
      "height": 44,
      "width": 80,
      "count": 141,
      "tileWidth": 0,
      "tileHeight": 0
    },
    "status": "OK",
    "statusText": "OK",
    "isLive": false,
    "notPublished": false,
    "isClip": false
  },
  "admanMetadata": {},
  "partnerId": -1,
  "ownerMovieId": "376357718731",
  "alwaysShowRec": false,
  "videos": [
    {
      "name": "low",
      "url": "https://vd551.okcdn.ru/?expires=1734680631327&srcIp=45.76.252.155&pr=10&srcAg=CHROME&ms=185.226.55.61&type=1&sig=Q70T0ruIj-I&ct=0&urls=45.136.22.7&clientType=0&zs=43&id=340295027403",
      "seekSchema": 3,
      "disallowed": false
    }
  ],
  "ondemandHls": "https://vd551.okcdn.ru/expires/1734680631327/clientType/0/srcIp/45.76.252.155/type/2/mid/376357718731/id/340295027403/ms/185.226.55.61/zs/43/srcAg/CHROME/urls/45.136.22.7/oq/0/pr/10/ct/28/sig/u-pZMkQqhzc/ondemand/hls4_340295027403.CMuVrIX6CkDL4YK04hBQCnInWXG31_BE.m3u8",
  "ondemandDash": "https://vd551.okcdn.ru/expires/1734680631327/clientType/0/srcIp/45.76.252.155/type/2/mid/376357718731/id/340295027403/ms/185.226.55.61/zs/43/srcAg/CHROME/urls/45.136.22.7/oq/0/pr/10/ct/29/sig/u-pZMkQqhzc/ondemand/dash4_340295027403.CMuVrIX6CkDL4YK04hBQCnInWXG31_BE.mpd",
  "failoverHosts": [
    "vd199.okcdn.ru"
  ],
  "autoplay": {
    "autoplayEnabled": true,
    "timeFromEnabled": true,
    "noRec": false,
    "fullScreenExit": false,
    "vitrinaSection": "recommended_movie"
  },
  "security": {
    "url": "https://vd551.okcdn.ru/usr_login",
    "cookie": "vdsig"
  },
  "p2pInfo": {
    "isPeerEnabled": false,
    "ubsc": 0,
    "pbsc": 0,
    "mptpc": 0,
    "pctmt": 0,
    "pbesc": 0,
    "prrt": 0,
    "srt": 0,
    "swrt": 0,
    "dctt": 0
  },
  "stunServers": [
    {
      "urls": [
        "stun:videostun.okcdn.ru:19302"
      ]
    }
  ],
  "pins": [],
  "episodes": []
}

@zjy4fun zjy4fun force-pushed the fix-ok.ru-download-failed branch from 75dbffe to 3704217 Compare December 19, 2024 07:58
@zjy4fun zjy4fun force-pushed the fix-ok.ru-download-failed branch from 3704217 to 40fda53 Compare December 19, 2024 08:07
@zjy4fun zjy4fun changed the title Fix ok.ru download failed api/ok: fix author not being handled properly Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ok .ru downloader not working
1 participant