You can enter this code directly into the browser console on the Financial Times' page on full constituency results for the 2017 UK General Election to get a csv-compatible output for parties who held the seats in 2015 and 2017.
You can see the results for this code in this Gist, in the file output.csv
.
You can read about what this is at my first blog post on the UK General Election results for 2017 -- that explains how I created this code and why.