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

Some page titles are not retrieved properly #989

Closed
ArthurHoaro opened this issue Oct 7, 2017 · 3 comments · Fixed by #2037
Closed

Some page titles are not retrieved properly #989

ArthurHoaro opened this issue Oct 7, 2017 · 3 comments · Fixed by #2037
Assignees
Labels
3rd party interoperability with third-party platforms documentation enhancement
Milestone

Comments

@ArthurHoaro
Copy link
Member

ArthurHoaro commented Oct 7, 2017

The titles aren't retrieved properly if they're not present using the <title> HTML tag (e.g. populated in JS, or any other exotic way).

We can extend our ways to retrieve titles. A few examples:

  • document.title
  • OpenGraph tag og:title
  • etc.

Original issue:

With the new design (I suppose), the <title> tag only contains YouTube, the actual title is populated using JS:

document.title = "Denis Brogniart :  \"AH\" - YouTube";

Usually, I would avoid adding specific code for specific websites, however YouTube is a common website to shaare, so maybe we should add something to retrieve the actual title.

@ArthurHoaro ArthurHoaro added 3rd party interoperability with third-party platforms enhancement labels Oct 7, 2017
@ArthurHoaro ArthurHoaro modified the milestones: 0.9.2, 0.9.3 Oct 7, 2017
@virtualtam
Copy link
Member

YouTube provides a REST API, but it requires having a Google account to create a Developer API token for authentication.

Corresponding PHP library: php-youtube-api

@nodiscc
Copy link
Member

nodiscc commented Oct 22, 2017

With the new design (I suppose), the <title> tag only contains YouTube, the actual title is populated using JS:

Honestly this sucks. Anyway... Shaarli gets the title correctly when either

  • sharing a youtube page from Firefox Share
  • sharing a youtube page from the bookmarklet

The only case where title fetching fails is when using +Shaare -> Enter URL. I don't know how widely used each workflow is. In the mean time, why not rename this issue to something generic like Some page titles are not retrieved properly, document it in https://github.com/shaarli/Shaarli/blob/master/doc/md/Troubleshooting.md, and see if/how the problem evolves over time?

I'd like to avoid site-specific code, even more so if we have to import whole libraries for a single website.

@ArthurHoaro
Copy link
Member Author

I wasn't talking about using their API, of course, because it requires an account, authentication token management, etc.

Anyway, I agree with your suggestion @nodiscc.

@ArthurHoaro ArthurHoaro changed the title Youtube title isn't retrieved anymore Some page titles are not retrieved properly Oct 28, 2017
@nodiscc nodiscc self-assigned this Aug 27, 2023
@nodiscc nodiscc modified the milestones: backlog to the future, 0.13.0 Aug 27, 2023
nodiscc added a commit to nodiscc/Shaarli that referenced this issue Nov 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3rd party interoperability with third-party platforms documentation enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants