| 19 | request.post = promisify(request.post) |
| 20 | |
| 21 | const getHeaders = session => ({ |
| 22 | 'Content-Type': 'application/json', |
| 23 | 'x-csrftoken': session.csrftoken, |
| 24 | cookie: `LEETCODE_SESSION=${session.LEETCODE_SESSION};csrftoken=${session.csrftoken};`, |
| 25 | }) |
| 26 | |
| 27 | const unicodeToChar = text => |
| 28 | text.replace(/\\u[\dA-F]{4}/gi, match => |