Some bug fixes
This commit is contained in:
+9
-4
@@ -126,10 +126,15 @@ class Discogs
|
||||
end
|
||||
|
||||
def self.get_master_albums url
|
||||
x = Nokogiri::HTML(open(url,
|
||||
'User-Agent' => 'Haven Search Bot',
|
||||
'Cookie' => 'artist_layout=med; artist_limit=500'
|
||||
).read)
|
||||
begin
|
||||
xml = open(url,
|
||||
'User-Agent' => 'Haven Search Bot',
|
||||
'Cookie' => 'artist_layout=med; artist_limit=500'
|
||||
).read
|
||||
rescue => e
|
||||
xml = ""
|
||||
end
|
||||
x = Nokogiri::HTML(xml)
|
||||
albums = []
|
||||
split = 0
|
||||
x.css('table.discography > tbody > tr').each do |_|
|
||||
|
||||
Reference in New Issue
Block a user