Skip to content

Commit

Permalink
Update fetch new symbol service
Browse files Browse the repository at this point in the history
  • Loading branch information
pan-xiong committed Mar 4, 2024
1 parent cebe855 commit ba269d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/services/fetch_new_symbol_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def execute
redis_key = 'binance_announcement_fetch_time'
last_fetch_time = $redis.get(redis_key).to_i
page = Nokogiri::HTML(URI.open(BASE_URL), nil, 'UTF-8')
data = JSON.parse(page.css("script").children[13])
data = JSON.parse(page.css("script").children[15])
catalog = data['appState']['loader']['dataByRouteId']['2a3f']['catalogs'].select{|c| c['catalogName'] == '数字货币及交易对上新'}.first rescue nil
return if catalog.nil?

Expand Down

0 comments on commit ba269d8

Please sign in to comment.