beizhedenglong / leetcode-site-generator Goto Github PK
View Code? Open in Web Editor NEWGenerate your personal LeetCode website with one command!
License: MIT License
Generate your personal LeetCode website with one command!
License: MIT License
I try to change the code there
const baseUrl = 'https://leetcode-cn.com';
const graphqlUrl = `${baseUrl}/graphql`;
const login = async () => {
const browser = await puppeteer.launch({ headless: false });
const page = await browser.newPage();
await page.goto('https://leetcode-cn.com/accounts/login/');
await page.waitForNavigation({
timeout: 0,
});
const cookies = await page.cookies();
await browser.close();
return cookies.reduce((acc, cookie) => {
const { name } = cookie;
acc[name] = cookie;
return acc;
}, {});
};
then I run yarn download, and I print account and secret in puppeteer browser, it throws with ‘验证失败’
Is there any way to solve it, thanks!
在 operationName 为 questionData
的 graph 接口中(该 graph 接口可以在 link 中找到), topicTags(题目类别) 这个字段比较有用能不能把它也输出来呢?
我试了下在 leetcode.js
文件中书写 graph 接口方法获取 topicTags 字段,
const getQuestionData = async (titleSlug) => {
const qglRequest = await createGqlRequest();
// interface from 'https://leetcode-cn.com/problems/add-two-numbers/'
const json = await qglRequest(`{
questionData($titleSlug: "${titleSlug}"){
question{
topicTags
}
}
}`);
const question = (json.questionData && json.questionData.question) || {};
return question;
};
调用后, 它报 CSRF 校验失败。
大佬有什么好的思路呢? 感谢。
const problems = require('../problems.json');
const sidebars = require('../sidebars.json');
报错,Cannot find module '../problems.json'
Hi, I am running yarn download
in the leetcode-site-base/website folder, but I keep getting Login failure, retry ...
I normally login to leetcode using the facebook sign in method, will this still work?
Here is what I've tried:
Neither seem to work. Am I missing something?
Node js version: 13.12.0
Yarn version: 1.22.4
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.