YouTube URL algorithm?

后端 未结 11 1870
遇见更好的自我
遇见更好的自我 2020-12-04 09:39

How would you go about generating the unique video URL\'s that YouTube uses?

Example:

  • http://www.youtube.com/watch?v=CvUN8qg9lsk
11条回答
  •  暖寄归人
    2020-12-04 10:37

    Typically you're hiding a numeric identifier in the form of something that doesn't look numeric. One simple method is something like base-36 encoding the number. You should be able to pull that off with one or another variant of itoa() in the language of your choice.

提交回复
热议问题