kukushi / PasteURL

A VSCode extension for pasting url in markdown-style.
MIT License
19 stars 8 forks source link

fails with YouTube #5

Closed Yzrsah closed 5 years ago

Yzrsah commented 6 years ago

Hello. Awesome extension. But we are using YouTube to do some research and it does not work with URL pasting!

All URL's pasted from YouTube fail to work correctly and have no information except "YouTube" in the title.

kukushi commented 6 years ago

It seems that Youtube simply put "Youtube" in their html title. It's hard to improve it in this case, but PR is always welcome.

Yzrsah commented 5 years ago

For YouTube it's just: "http://www.youtube.com/oembed?url=http://www.youtube.com/watch?v=" + vid + "&format=json" The returned JSON contains the title.

It is only a few lines of code to add this, you probably have a preferred way of altering your code to deal with i.e. processSpecialURL()

I threw it in as a quick hack

Yzrsah commented 5 years ago

SuperPasteURL closes this issue.

https://github.com/alincode/SuperPasteURL https://marketplace.visualstudio.com/items?itemName=alincode.SuperPasteURL