Closed veitikka closed 4 years ago
Done, I also noticed a problem, certain special characters in titles like quotation marks are displayed as html entities. I added another local function to convert some of the more common ones. Maybe those functions should be moved to their own file, but if you're fine with them being there I'll leave it like that.
Alright, thanks again for the improvement ideas. The function still "succeeds" in most cases if title or duration are invalid, so I added handling for that too. From what I've tested it should be quite error-resistant now.
Where have you found the parsing to fail? Are there certain types of youtube videos which don't seem to work?
Where have you found the parsing to fail? Are there certain types of youtube videos which don't seem to work?
Bad wording on my part, I didn't find any cases where it would fail.
Hello, I updated the GetMetadata function to get meta data info from the parsed HTML page instead. The new function "ParseYTMetaDataFromHTML" takes care of this. The video requests can be a bit slow, since it requests an almost 1MB web page, maybe there is a better way to do this, I also have no idea how stable of a fix this will be, if youtube changes the names of the variables in future, it will no longer work.
fixes #33