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

[Bug] /api/v1/search/ - missing protocol names in channel thumbnail URLs #4895

Open
brunteless opened this issue Sep 3, 2024 · 0 comments
Open
Labels
bug Something isn't working

Comments

@brunteless
Copy link

Describe the bug
Links that point to a channel thumbnail from the search endpoint have missing https: or http: protocol name. This doesn't appear to be the case with the /api/v1/channels/:id endpoint.

Steps to Reproduce

  1. Go to https://your-instance-of.choice/api/v1/search?q=known-channel
  2. Find the given channel
  3. Scroll down to the authorThumbnails list
  4. See the URLs start with //yt.image.provider/... instead of https://yt.image.provider/... or http://yt.image.provider/...

Example
Search result consistent across multiple public API instances:

[  
   {  
       "type": "channel",  
       "author": "MrBeast",  
       "authorId": "UCX6OQ3DkcsbYNE6H8uQQuVA",  
       "authorUrl": "/channel/UCX6OQ3DkcsbYNE6H8uQQuVA",  
       "authorVerified": true,  
       "authorThumbnails": [  
           {  
               "url": "//yt3.ggpht.com/fxGKYucJAVme-Yz4fsdCroCFCrANWqw0ql4GYuvx8Uq4l_euNJHgE-w9MTkLQA805vWCi-kE0g=s88-c-k-c0x00ffffff-no-rj-mo",  
               "width": 32,  
               "height": 32  
           },  
           {  
               "url": "//yt3.ggpht.com/fxGKYucJAVme-Yz4fsdCroCFCrANWqw0ql4GYuvx8Uq4l_euNJHgE-w9MTkLQA805vWCi-kE0g=s88-c-k-c0x00ffffff-no-rj-mo",  
               "width": 48,  
               "height": 48  
           },  
           {  
               "url": "//yt3.ggpht.com/fxGKYucJAVme-Yz4fsdCroCFCrANWqw0ql4GYuvx8Uq4l_euNJHgE-w9MTkLQA805vWCi-kE0g=s88-c-k-c0x00ffffff-no-rj-mo",  
               "width": 76,  
               "height": 76  
           },  
           {  
               "url": "//yt3.ggpht.com/fxGKYucJAVme-Yz4fsdCroCFCrANWqw0ql4GYuvx8Uq4l_euNJHgE-w9MTkLQA805vWCi-kE0g=s88-c-k-c0x00ffffff-no-rj-mo",  
               "width": 100,  
               "height": 100  
           },  
           {  
               "url": "//yt3.ggpht.com/fxGKYucJAVme-Yz4fsdCroCFCrANWqw0ql4GYuvx8Uq4l_euNJHgE-w9MTkLQA805vWCi-kE0g=s88-c-k-c0x00ffffff-no-rj-mo",  
               "width": 176,  
               "height": 176  
           },  
           {  
               "url": "//yt3.ggpht.com/fxGKYucJAVme-Yz4fsdCroCFCrANWqw0ql4GYuvx8Uq4l_euNJHgE-w9MTkLQA805vWCi-kE0g=s88-c-k-c0x00ffffff-no-rj-mo",  
               "width": 512,  
               "height": 512  
           }  
       ]  
   },
   ...  
]

Possible Fix
What I presume should be the correct behavior:

[  
   {  
       "type": "channel",  
       "author": "MrBeast",  
       "authorId": "UCX6OQ3DkcsbYNE6H8uQQuVA",  
       "authorUrl": "/channel/UCX6OQ3DkcsbYNE6H8uQQuVA",  
       "authorVerified": true,  
       "authorThumbnails": [  
           {  
               "url": "https://yt3.ggpht.com/fxGKYucJAVme-Yz4fsdCroCFCrANWqw0ql4GYuvx8Uq4l_euNJHgE-w9MTkLQA805vWCi-kE0g=s88-c-k-c0x00ffffff-no-rj-mo",  
               "width": 32,  
               "height": 32  
           },  
           {  
               "url": "https://yt3.ggpht.com/fxGKYucJAVme-Yz4fsdCroCFCrANWqw0ql4GYuvx8Uq4l_euNJHgE-w9MTkLQA805vWCi-kE0g=s88-c-k-c0x00ffffff-no-rj-mo",  
               "width": 48,  
               "height": 48  
           },  
           {  
               "url": "https://yt3.ggpht.com/fxGKYucJAVme-Yz4fsdCroCFCrANWqw0ql4GYuvx8Uq4l_euNJHgE-w9MTkLQA805vWCi-kE0g=s88-c-k-c0x00ffffff-no-rj-mo",  
               "width": 76,  
               "height": 76  
           },  
           {  
               "url": "https://yt3.ggpht.com/fxGKYucJAVme-Yz4fsdCroCFCrANWqw0ql4GYuvx8Uq4l_euNJHgE-w9MTkLQA805vWCi-kE0g=s88-c-k-c0x00ffffff-no-rj-mo",  
               "width": 100,  
               "height": 100  
           },  
           {  
               "url": "https://yt3.ggpht.com/fxGKYucJAVme-Yz4fsdCroCFCrANWqw0ql4GYuvx8Uq4l_euNJHgE-w9MTkLQA805vWCi-kE0g=s88-c-k-c0x00ffffff-no-rj-mo",  
               "width": 176,  
               "height": 176  
           },  
           {  
               "url": "https://yt3.ggpht.com/fxGKYucJAVme-Yz4fsdCroCFCrANWqw0ql4GYuvx8Uq4l_euNJHgE-w9MTkLQA805vWCi-kE0g=s88-c-k-c0x00ffffff-no-rj-mo",  
               "width": 512,  
               "height": 512  
           }  
       ]  
   },
   ...  
]

Note
If the current behavior is correct (e.g. to give developers a choice between http and https), it should be reflected in the documentation more clearly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant