This commit is contained in:
albert
2013-04-03 16:38:42 -04:00
parent 3a96bb0811
commit b2f77268f3

View File

@@ -1017,6 +1017,8 @@ class Post < ActiveRecord::Base
def parse_pixiv_id
if source =~ %r!http://i\d\.pixiv\.net/img-inf/img/\d+/\d+/\d+/\d+/\d+/\d+/(\d+)_s.jpg!
self.pixiv_id = $1
elsif source =~ %r!http://img\d+\.pixiv\.net/img/[^\/]+/(\d+)!
self.pixiv_id = $1
elsif source =~ %r!http://i\d\.pixiv\.net/img\d+/img/[^\/]+/(\d+)!
self.pixiv_id = $1
elsif source =~ /pixiv\.net/ && source =~ /illust_id=(\d+)/