Skip to content

Commit ed5353e

Browse files
committed
fixes #39: parse the right description.
Signed-off-by: Eric Wang <[email protected]>
1 parent 74e18f6 commit ed5353e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/leetcode_client.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,9 @@ leetcodeClient.getProblem = function(user, problem, cb) {
157157

158158
problem.totalAC = $(info[0]).text();
159159
problem.totalSubmit = $(info[1]).text();
160-
problem.desc = $('meta[property="og:description"]').attr('content');
160+
// TODO: revisit this if later leetcode remove this element.
161+
// Then we need parse the body to get the description.
162+
problem.desc = $('meta[name="description"]').attr('content');
161163
problem.desc = he.decode(problem.desc);
162164

163165
var pageData;

0 commit comments

Comments
 (0)