Open mikavilpas opened 14 years ago
Currently researching, findings:
the page is very large. It contains lots of empty lines, a hard-coded stylesheet (hundreds of lines), and quite a bit of javascript. The size of the file is 228KB. The title is found on line number 3076 (!).
However, the test script (non-irssi) was able to get the title so Irssi should too.
Here's a useful find, might try this and see if it magically solves all problems: http://www.wdvl.com/Authoring/Languages/Perl/PerlfortheWeb/summarizer.html
Tried TokeParser. It got the title from the link in this issue in my test script that's not running inside Irssi. Inside Irssi, however, it was unable to perform.
Came across this module, which is designed to get the title from web pages as well as images, mp3s and pdf files. Will have to research and perhaps redesign the whole method for getting the title.
http://search.cpan.org/~tomi/URI-Title-1.82/lib/URI/Title.pm
That module is not working out for me. I'm not going to develop support for it at this point. The idea about getting titles from pdf files, images and mp3 files is a very good one.
My test script gets the title perfectly fine. However, the same exact block of code when running in Irssi does not.
Trying different options for HTML::TokeParser to see if they get the desired effect.
What steps will reproduce the problem?
What is the expected output? What do you see instead? 19:38 -!- File: ASCII C program text, with very long lines the page has a title but it is not found