chore(deps-dev): bump prettier from 1.19.1 to 2.0.2

This commit is contained in:
DIYgod
2020-04-02 21:21:46 +08:00
parent 27e4a7c151
commit 0e7b14e718
471 changed files with 1237 additions and 4457 deletions

View File

@@ -13,37 +13,15 @@ module.exports = async (ctx) => {
});
const data = response.data;
const $ = cheerio.load(data);
const username = $('div.panel-body')
.find('p')
.text(); // 用户名
const img = $('div.panel-body')
.find('img')
.attr('src'); // 用户的头像
const username = $('div.panel-body').find('p').text(); // 用户名
const img = $('div.panel-body').find('img').attr('src'); // 用户的头像
const src = `<img src="${img}">`;
const solvedQuestion = $('ul.list-group')
.eq(2)
.children()
.eq(0)
.find('span')
.text(); // 解决的题目
const acceptedSubmission = $('ul.list-group')
.eq(2)
.children()
.eq(1)
.find('span')
.text(); // 通过的提交
const acceptanceRate = $('ul.list-group')
.eq(2)
.children()
.eq(2)
.find('span')
.text(); // 通过率
const solvedQuestion = $('ul.list-group').eq(2).children().eq(0).find('span').text(); // 解决的题目
const acceptedSubmission = $('ul.list-group').eq(2).children().eq(1).find('span').text(); // 通过的提交
const acceptanceRate = $('ul.list-group').eq(2).children().eq(2).find('span').text(); // 通过率
const state = ' Most recent submissions';
const description = 'Solved Question: ' + solvedQuestion + '<br>Accepted Submission: ' + acceptedSubmission + '<br>Acceptance Rate: ' + acceptanceRate + '<br>' + src;
const list = $('ul.list-group')
.eq(-1)
.children()
.get();
const list = $('ul.list-group').eq(-1).children().get();
const result = await util.ProcessFeed(list);
ctx.state.data = {
title: username + state,