使用nodejs解析优酷,奇艺视频源地址

项目地址

这个项目通过一个优酷或者爱奇艺的视频地址,最终可以得到视频的下载地址

这个项目的想法是来源:https://github.com/keygle/parseVideo

因为自己要用到优酷和奇艺,所以就测试了这两个,测试结果是优酷的可以使用,爱奇艺的已经失效。

经过研究爱奇艺的视频页面的http请求,以及反编译视频播放器,找到它的下载地址,自己做了一个pr,现在该项目作者已经merge了。

What Mongoose Never Explain to You (on Case Sentivity)

原文地址:http://samwize.com/2014/03/07/what-mongoose-never-explain-to-you-on-case-sentivity/

Mongoose is the most popular library for using Mongodb on Node.js.

I took some time to learn about the case sentivity and model name renaming it does behind the curtain.

Let’s assume the model I have is ‘Campaign’.

  • mongodb collection name is case sensitive (‘Campaigns’ is different from ‘campaigns’)
  • mongodb best practises is to have all lower case for collection name (‘campaigns’ is preferred)
  • mongoose model name should be singular and upper case (‘Campaign’)
  • mongoose will lowercase and pluralize with an ’s’ so that it can access the collection (‘Campaign’ >> ‘campaigns’)

Knowing this is especially useful if you are dealing with existing collections.

AltStyle によって変換されたページ (->オリジナル) /