fix for artist search
This commit is contained in:
@@ -60,7 +60,7 @@ module Sources
|
|||||||
@agent ||= begin
|
@agent ||= begin
|
||||||
mech = Mechanize.new
|
mech = Mechanize.new
|
||||||
|
|
||||||
mech.get("http://seiga.nicovideo.jp/login/redirect?next_url=") do |page|
|
mech.get("https://secure.nicovideo.jp/secure/login_form") do |page|
|
||||||
page.form_with do |form|
|
page.form_with do |form|
|
||||||
form["mail"] = Danbooru.config.nico_seiga_login
|
form["mail"] = Danbooru.config.nico_seiga_login
|
||||||
form["password"] = Danbooru.config.nico_seiga_password
|
form["password"] = Danbooru.config.nico_seiga_password
|
||||||
|
|||||||
@@ -230,7 +230,7 @@ class Artist < ActiveRecord::Base
|
|||||||
q = active
|
q = active
|
||||||
return q if params.blank?
|
return q if params.blank?
|
||||||
|
|
||||||
case params[:name].present?
|
case params[:name]
|
||||||
when /^http/
|
when /^http/
|
||||||
q = q.url_matches(params[:name])
|
q = q.url_matches(params[:name])
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ module Sources
|
|||||||
class NicoSeigaTest < ActiveSupport::TestCase
|
class NicoSeigaTest < ActiveSupport::TestCase
|
||||||
context "The source site for nico seiga" do
|
context "The source site for nico seiga" do
|
||||||
setup do
|
setup do
|
||||||
|
# Sources::Strategies::NicoSeiga.new("http://lohas.nicoseiga.jp/priv/2853566?e=1361296671&h=794b3686b02edfd64c22ed2f99a4c55650371854")
|
||||||
@site = Sources::Site.new("http://seiga.nicovideo.jp/seiga/im1464351?track=ranking")
|
@site = Sources::Site.new("http://seiga.nicovideo.jp/seiga/im1464351?track=ranking")
|
||||||
@site.get
|
@site.get
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user