VideoHelp Forum
+ Reply to Thread
Results 1 to 10 of 10
Thread
  1. delete
    Last edited by swappyison; 22nd Oct 2023 at 00:34.
    Quote Quote  
  2. Search, Learn, Download! Karoolus's Avatar
    Join Date
    Oct 2022
    Location
    Belgium
    Search Comp PM
    Why not just always download the highest quality?
    Quote Quote  
  3. @swappyison
    it's true that I don't usually put my name in my scripts, but if you create a github with my script at least include my name..
    https://github.com/swappyison/JiocinemaDownloader/blob/main/jiodownloader.py

    ------------------

    otherwise if you want to use N_m3u8DL-RE it's not the best solution to ask the user for the resolution
    because, if he gives you a resolution that is not there, RE will not download the video just the audio

    with yt-dlp that if you enter 1080 and maybe 540p is the highest resolution available, download the 540p and it won't throw an error


    so, if you want to get the resolution from the user, yt-dlp is the better choice..
    Quote Quote  
  4. delete
    Last edited by swappyison; 22nd Oct 2023 at 00:35.
    Quote Quote  
  5. Search, Learn, Download! Karoolus's Avatar
    Join Date
    Oct 2022
    Location
    Belgium
    Search Comp PM
    Originally Posted by swappyison View Post
    sure, I am getting a problem with scraper it can scrape episodes up to 10 but not higher.

    like i tried this: https://www.jiocinema.com/tv-shows/up65/3758866
    for higher episodes it just takes too long to load and doesn't give any links
    this is the code:

    Code:
    ...
    Wait, are you emulating a browser and scrolling down the page to extract links?


    Try this:

    Perform a GET request to this url:
    Code:
    https://content-jiovoot.voot.com/psapi/voot/v1/voot-web/view/show/3758866?&responseType=common&features=include:buttonsTray&premiumTrays=false&devicePlatformType=desktop
    (you can obviously change the show ID in the url)

    You'll get back something like this:
    Code:
    {
        "id": "3758866",
        "name": "UP65",
        "description": "Extended from - show",
        "platformId": "voot-common",
        "slug": "show",
        "customizable": false,
        "editable": true,
        "default": true,
        "trays": [
            ....
            {
                "tabId": "",
                "layoutOptions": {},
                "cardTemplateId": "with_title_subtitle_below_image",
                "customOptions": [],
                "description": "All Season by show (Chips) (Show ID is cascased by API)",
                "filters": [
                    {
                        "values": "",
                        "scope": "api",
                        "exposed": false,
                        "preset": false,
                        "validValues": [],
                        "key": "id"
                    },
                    {
                        "values": "SERIES",
                        "scope": "static",
                        "exposed": false,
                        "preset": true,
                        "validValues": [],
                        "key": "type"
                    }
                ],
                "title": "Episodes",
                "segments": [],
                "layout": "SeasonsLayoutMultiFilterRail",
                "layoutTemplateId": "16x13 2 cards",
                "moreLayout": "SeasonsLayoutMultiFilterRail",
                "apiUrl": "content/generic/series-wise-episode?sort=episode%3Aasc&id=3758869",
                "lockedBy": "",
                "meta": {
                    "contentVersions": [
                        "*"
                    ],
                    "isAvodTray": false,
                    "trayType": "dynamic",
                    "isPremiumTray": false
                },
                "trayId": "season-by-show-multifilter",
                "isLocked": false,
                "apiPath": "content/generic/series-wise-episode?sort=episode%3Aasc&id=3758869",
                "id": "rail_jiouat_voot-common_show_0_season-by-show-multifilter_182248302",
                "sorts": [
                    {
                        "orders": [
                            "desc",
                            "asc"
                        ],
                        "label": "Season",
                        "preset": true,
                        "key": "season",
                        "order": "desc"
                    }
                ],
                "status": "published",
                "moreButtons": [],
                "trayTabs": [
                    {
                        "id": "3758869",
                        "label": "Season 1",
                        "type": "dynamic",
                        "queryId": "",
                        "apiUrl": "content/generic/series-wise-episode?sort=episode%3Aasc&id=3758869"
                    },
                    {
                        "id": "3758871",
                        "label": "Season 2",
                        "type": "dynamic",
                        "queryId": "",
                        "apiUrl": "content/generic/series-wise-episode?sort=episode%3Aasc&id=3758871"
                    }
                ],
                "totalTrayTabs": 2
            },
        ],
        "variant": "0",
        "basePlatform": "voot-common",
        "updated": 1689927337,
        "includeBaseTrays": false,
        "groupName": "Default Views",
        "scaffoldId": "default",
        "tabs": [],
        "tabbed": false,
        "scope": "custom",
        "extended": true,
        "parentViewId": "show",
        "activeTrayLimit": "999",
        "trayCount": 6,
        "viewConfigUrl": ""
    }
    The ... represent more trays in the request but as far as I could tell, they were useless so just ignore them. Look for the tray with title Episodes

    This will give you an ID for all seasons of that show. These IDs can be used to do a new request that will return all episode metadata (including the video URLs)

    For UP65, there is 2 seasons. The IDs for those seasons are:
    Code:
    "trayTabs": [
        {
            "id": "3758869",
            "label": "Season 1",
            "type": "dynamic",
            "queryId": "",
            "apiUrl": "content/generic/series-wise-episode?sort=episode%3Aasc&id=3758869"
        },
        {
            "id": "3758871",
            "label": "Season 2",
            "type": "dynamic",
            "queryId": "",
            "apiUrl": "content/generic/series-wise-episode?sort=episode%3Aasc&id=3758871"
        }
    ]
    As you can see, there's an ID for each season, but also an apiUrl. You could go 2 ways for the next request:

    1.
    Code:
    f"https://content-jiovoot.voot.com/psapi/voot/v1/voot-web/{apiUrl}&responseType=common"
    or

    2.
    Code:
    id = "whateverseasonID"
    f"https://content-jiovoot.voot.com/psapi/voot/v1/voot-web/content/generic/series-wise-episode?sort=episode:asc&id={id}&responseType=common"
    Either one should work just fine

    The response to that request is: https://pastebin.com/D7PfYCVi

    It should have all the information you need
    Quote Quote  
  6. thank you so much!
    Quote Quote  
  7. hi the json data has for some reason only 10 episodes while the first season has 13 of them, what could be the reason?
    Quote Quote  
  8. Search, Learn, Download! Karoolus's Avatar
    Join Date
    Oct 2022
    Location
    Belgium
    Search Comp PM
    Oh I didn't notice that. Check the bottom of the json reply, how many pages does it show? It might only give 10 episodes in a normal request so you might have to check for extra pages and do another request
    Quote Quote  
  9. shows Page 1. both api url seem to give only 10 videos
    Quote Quote  
  10. Search, Learn, Download! Karoolus's Avatar
    Join Date
    Oct 2022
    Location
    Belgium
    Search Comp PM
    I just had a look and it indeed only shows 10 episodes per page. That is easily solved though.

    In that last request you have this in the json:
    Code:
    "totalAsset": 13
    Knowing that it only doens 10 episodes per page, you can just do this:

    Code:
    totalAsset = json['totalAsset']
    totalPages = math.ceil(int(totalAsset)/10)
    
    for x in range(totalPages):
        requestUrl = 'https://content-jiovoot.voot.com/psapi/voot/v1/voot-web/content/generic/series-wise-episode?sort=episode%3Aasc&id=3758869&responseType=common&page=' + str(x)
        #perform the request, parse the episodes, then do the next loop for the other pages
        #rinse and repeat

    Edit: I don't code in Python so my code is probably not correct, but you should be able to fix it up easily. Either way, I'm sure you get what I mean so you should be able to come up with working code anyway
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!