fetch photo script update: add fetch_by_class func.