Skip to content

Instantly share code, notes, and snippets.

@DanNi0130
Created February 25, 2019 08:50
Show Gist options
  • Save DanNi0130/94ed32f67a7b32b4ebfeb2117ee6510a to your computer and use it in GitHub Desktop.
Save DanNi0130/94ed32f67a7b32b4ebfeb2117ee6510a to your computer and use it in GitHub Desktop.
jsIDsearch = re.compile(r'\<a href="#\/item\/(\d+)"') # Don’t forget the \ before the /’s and <’s!
jsthreadIDs = jsIDsearch.findall(str(jspagedata))
jscommentlinks = []
for i in range(len(jsthreadIDs)):
jscommentlinks.append('https://vuejs.github.io/vue-hackernews/#/item/' + jsthreadIDs[i])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment