A Perl program to scrape all texts from Typeracer. Made with quick regular expressions, so no guarantees it will still work if they change their UI.
This program requires the following non-core Perl modules:
- LWP::Simple
- Mozilla::CA
- JSON
Install them with:
cpan LWP::Simple Mozilla::CA JSON
chmod +x typeracer-text-scraper.pl
./typeracer-text-scraper.pl
Typeracer data will be written to the file data.json
in JSON format.
[
{
"id": 4180447,
"text": "Don't it make you sad to know that life is more than who you are?",
"amazonQuery": "B000002MUE",
"source": "Name",
"type": "song",
"author": "The Goo Goo Dolls",
"avgSpeed": 154,
"avgAccuracy": 98.7
},
{
"id": 4180545,
"text": "You must take life the way it comes at you and make the best of it.",
"amazonQuery": "0156027321",
"source": "Life of Pi",
"type": "book",
"author": "Yann Martel",
"avgSpeed": 130,
"avgAccuracy": 98.1
},
{
"id": 4180144,
"text": "I'm sure there are things you know that you don't even know you know.",
"amazonQuery": "1442423692",
"source": "UnSouled",
"type": "book",
"author": "Neal Shusterman",
"avgSpeed": 144,
"avgAccuracy": 98
},
{
"id": 3810446,
"text": "They don't know that we know they know we know.",
"amazonQuery": "B000H6SXMY",
"source": "Friends",
"type": "other",
"author": "David Crane and Marta Kauffman",
"avgSpeed": 158,
"avgAccuracy": 98.1
},
{
"id": 3550533,
"text": "Perhaps if you know you are insane then you are not insane.",
"amazonQuery": "0547572484",
"source": "The Man in the High Castle",
"type": "book",
"author": "Philip K. Dick",
"avgSpeed": 145,
"avgAccuracy": 98.2
},
...
]