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

Question regarding title extraction #770

Open
unsleepy22 opened this issue Dec 16, 2024 · 1 comment
Open

Question regarding title extraction #770

unsleepy22 opened this issue Dec 16, 2024 · 1 comment
Labels
question Further information is requested

Comments

@unsleepy22
Copy link
Contributor

In metadata.py and related tests I see that title wrapped in h1 in the body is preferred even when a non-empty title exists in meta head, this should be intentional right? In some cases this may produce bad case, like https://mozi.ustc.edu.cn/detail/1106, is it possible to compare the length of h1 title and head title to choose the longer one?

@adbar adbar added the question Further information is requested label Dec 18, 2024
@adbar
Copy link
Owner

adbar commented Dec 18, 2024

@unsleepy22 Thanks for the suggestion, the heuristics for titles could be improved. The problem with your approach is when the head title also entails the name of the website or keywords for SEO purposes, then it will be longer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants