iv-org / invidious

Invidious is an alternative front-end to YouTube
https://invidious.io
GNU Affero General Public License v3.0
16.29k stars 1.81k forks source link

[Bug] Video descriptions sometimes don't load. #3660

Closed unnamed24 closed 1 year ago

unnamed24 commented 1 year ago

It was noticed that at random times and it is not clear from what situations, the descriptions for the video are not loaded, which leaves an empty field instead of the description. Video example: https://inv.odyssey346.dev/watch?v=mPypEpPB2UQ Screenshot of what the video description field looks like at the moment: unnamed However, at the same time, on YouTube, the descriptions are loaded as expected.


Bounties for fixing this issue:

garoto commented 1 year ago

Observing this behavior as well on four public instances and with different, popular videos.

SamantazFox commented 1 year ago

Youtube has changed their description format ...

Here's how it looks now:

"attributedDescription": {
  "content": "Save 10% and Free Worldwide Shipping at The Ridge by using offer code WAN at https://www.ridge.com/LINUS\n\nVisit https://www.squarespace.com/WAN and use offer code WAN for 10% off\n\nJumpCloud offers an Open Directory Platform that makes it possible to unify your technology stack across identity, access, and device management. Learn more here: https://lmg.gg/JumpCloud\n\nPodcast Download: TBD\n\nTimestamps: TBD",
  "commandRuns": [
    {
      "startIndex": 77,
      "length": 27,
      "onTap": {
        "innertubeCommand": {
          "commandMetadata": {
            "webCommandMetadata": {
              "url": "https://www.youtube.com/redirect?q=https%3A%2F%2Fwww.ridge.com%2FLINUS&v=_FqH1rqQrQg",
              "webPageType": "WEB_PAGE_TYPE_UNKNOWN",
              "rootVe": 83769
            }
          },
          "urlEndpoint": {
            "url": "https://www.youtube.com/redirect?q=https%3A%2F%2Fwww.ridge.com%2FLINUS&v=_FqH1rqQrQg",
            "target": "TARGET_NEW_WINDOW",
            "nofollow": true
          }
        }
      }
    },
    {
      "startIndex": 112,
      "length": 31,
      "onTap": {
        "innertubeCommand": {
          "commandMetadata": {
            "webCommandMetadata": {
              "url": "https://www.youtube.com/redirect?q=https%3A%2F%2Fwww.squarespace.com%2FWAN&v=_FqH1rqQrQg",
              "webPageType": "WEB_PAGE_TYPE_UNKNOWN",
              "rootVe": 83769
            }
          },
          "urlEndpoint": {
            "url": "https://www.youtube.com/redirect?q=https%3A%2F%2Fwww.squarespace.com%2FWAN&v=_FqH1rqQrQg",
            "target": "TARGET_NEW_WINDOW",
            "nofollow": true
          }
        }
      }
    },
    {
      "startIndex": 343,
      "length": 24,
      "onTap": {
        "innertubeCommand": {
          "commandMetadata": {
            "webCommandMetadata": {
              "url": "https://www.youtube.com/redirect?q=https%3A%2F%2Flmg.gg%2FJumpCloud&v=_FqH1rqQrQg",
              "webPageType": "WEB_PAGE_TYPE_UNKNOWN",
              "rootVe": 83769
            }
          },
          "urlEndpoint": {
            "url": "https://www.youtube.com/redirect?q=https%3A%2F%2Flmg.gg%2FJumpCloud&v=_FqH1rqQrQg",
            "target": "TARGET_NEW_WINDOW",
            "nofollow": true
          }
        }
      }
    }
  ],
  "styleRuns": [
    {
      "startIndex": 77,
      "length": 27,
      "fontColor": 4278607828
    },
    {
      "startIndex": 112,
      "length": 31,
      "fontColor": 4278607828
    },
    {
      "startIndex": 343,
      "length": 24,
      "fontColor": 4278607828
    }
  ]
}
Trit34 commented 1 year ago

Another example, if needed: https://invidious.fdn.fr/watch?v=zL-OjQtvb68 (no description at all, though there is one on the original YT page)

But it’s still working fine on other videos, like this one: https://invidious.fdn.fr/watch?v=MEHTgCy0TJ4

SamantazFox commented 1 year ago

Related: https://github.com/TeamNewPipe/NewPipeExtractor/pull/953

gardockt commented 1 year ago

As a workaround, I made a UserScript that gets the description from <meta> node: https://gist.github.com/gardockt/af1243d36d8b659b98a13720b81bd9f3

a7maadf commented 1 year ago

Youtube has changed their description format ...

Here's how it looks now:

How did it look earlier? @SamantazFox

Trit34 commented 1 year ago

As a workaround, I made a UserScript that gets the description from <meta> node: https://gist.github.com/gardockt/af1243d36d8b659b98a13720b81bd9f3

Does not work for me (in TamperMonkey, on an instance in version 2023.03.12-cbb034f1 @ master).

99thim commented 1 year ago

UserScript doesnt work for me either (also used TamperMonkey on Firefox) on the 5 largest instances which are included in the script.

garoto commented 1 year ago

For reference, the user-script by gardockt works for me using Palemoon v31.4.2 with its old, greasymonkey specific fork.

gardockt commented 1 year ago

Thank you for reporting - I updated the script, and now it should work with Tampermonkey as well. I also fixed the bug that causes description to overlap with comments.

99thim commented 1 year ago

Yes it works now, pretty cool. Thank YOU !

99thim commented 1 year ago

With respect to gradockt's UserScript of Video Description which I have been testing and which now works on all instances, there maybe some further improvements that I would like to suggest if it is doable:- 1) Currently urls are in plain text, so maybe they could be formated as hyperlinks so urls are 'clickable'? 2) Video Time Stamps which are sometimes added in the Video Description to directly go to the defined time of the video are also in plain text, so maybe also make them 'clickable' to go to the right section. Though I am not sure how this could be programatically achievable in the context of a UserScript format.
Anyway, the currently script is big step compared to what we were missing before in any case with Youtube's changes.

gardockt commented 1 year ago

Clickable links are possible to do, but it would require a bit of effort. Personally, I think that doing these changes not only may not be worth the gains (especially considering that this script is designed to become obsolete one day, hopefully soon), but also may require more effort than actually fixing this issue. Nevertheless, anyone who wants to implement hyperlinks is welcome to edit the script.

That said, I hope that my UserScript is not too much of a distraction from the actual problem. This issue does not look too hard to fix - in fact, before creating the script I wanted to tackle it on my own, but quickly realized that trying to do so without knowing the language is pointless. Instead of focusing on improving the workaround, I strongly encourage to try to fix the main problem.

I would also recommend moving the discussion related to my script to its comment section.

LennyPenny commented 1 year ago

I'm hereby offering a 5€ bounty via paypal to anyone who gets this fixed in master! (send me a message from a mastodon account or email linked in your github profile linked to the commit once merged)

ps: didnt invidious have a task bounty program before?

99thim commented 1 year ago
  1. gardockt: Totally understand
  2. Same as LennyPenny, happy to offer $5 too to have this fixed. Would pay with bitcoin
Trit34 commented 1 year ago

@gardockt It works! Thank you!

I just had to add a match line for my favorite instance (// @match *://invidious.fdn.fr/*).

URLs are in plain text, but they are complete, so it’s no big deal to select and open them with a right click → Go to “[URL]”.

unixfox commented 1 year ago

While I really like the dedication from the community for willing to offer donations towards fixing this issue, I would prefer to keep it on topic in order to help the developers to easily and quickly gather in this discussion the information needed to fix this issue.

@LennyPenny We do have a bounty program: https://github.com/iv-org/invidious/issues/1898

If you want to give another bounty, please contact me on these official invidious channels, and I'll add your bounty on the very first comment:

techmetx11 commented 1 year ago

3701 should fix this

99thim commented 1 year ago

Did this really solved this? I dont see any difference?

precondition commented 1 year ago

Did this really solved this? I dont see any difference?

What's the version shown at the bottom of the instance you're using? The fix has been merged less than a hour ago. Not all instances update that quickly.

99thim commented 1 year ago

Ah yes your are correct, version used 2023.04.01-8db2a938.

Trit34 commented 1 year ago

My favorite instance is updated every Sunday, so I’ll wait a bit before I can remove the user-script proposed by @gardockt.

Thank you, @techmetx11 and @SamantazFox! o/

Loigzorn commented 1 year ago

The bugfix is much appreciated. I applied the new release to my instance today and can confirm the video descriptions are loaded.

Thank you very much!

MintMain21 commented 1 year ago

I've noticed that on instances where the bug has been resolved, the userscript seemingly does nothing, so there's no harm in keeping it installed until you feel it's truly unnecessary.

UltraBlackLinux commented 1 year ago

Still experiencing this on 2023.08.26-ac0c060 https://vid.puffyan.us

unixfox commented 1 year ago

Still experiencing this on 2023.08.26-ac0c060 vid.puffyan.us

which video ID?

UltraBlackLinux commented 1 year ago

I was about to tell you that this affects any video, and then noticed that ublock origin out of all things is causing this. Some filterlist must be broken.

Sorry for necrobumping.

unixfox commented 1 year ago

Please give the full URL. Can't replicate the issue for the moment.