We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4a5fd88 commit ccd830eCopy full SHA for ccd830e
scripts/parse_source.py
@@ -0,0 +1,16 @@
1
+#!/usr/bin/env python
2
+
3
+from pyquery import PyQuery as pq
4
5
+def get_lc_src_tags(lc_page):
6
+ raw_tags = lc_page('.btn.btn-xs.btn-primary')
7
+ return [tag.text() for tag in raw_tags.items()]
8
9
+def get_lc_src_title(lc_page):
10
+ raw_title = lc_page('title').text().split('|')[0][:-1]
11
12
+def get_lc_difficulty(lc_title):
13
+ search_url = "https://leetcode.com/problemset/algorithms/"
14
15
+def get_source_page(source_url):
16
+ return pq(url=source_url)
0 commit comments