Rakefile: the extraction of PGN is fixed in accordance with new 'lichess' layout.
This commit is contained in:
parent
4cb558788f
commit
1fecc222c7
2
Rakefile
2
Rakefile
@ -140,7 +140,7 @@ namespace :pgn do
|
|||||||
require 'open-uri'
|
require 'open-uri'
|
||||||
|
|
||||||
doc = Nokogiri::HTML open ENV['url']
|
doc = Nokogiri::HTML open ENV['url']
|
||||||
link = doc.css('a.view_pgn_toggle').first
|
link = doc.css('.fen_pgn a').first
|
||||||
pgn_url = 'http://lichess.org' + link['href']
|
pgn_url = 'http://lichess.org' + link['href']
|
||||||
str = URI.parse(pgn_url).read
|
str = URI.parse(pgn_url).read
|
||||||
File.open('temp.pgn', 'w') { |f| f.write str }
|
File.open('temp.pgn', 'w') { |f| f.write str }
|
||||||
|
Loading…
Reference in New Issue
Block a user