Skip to content

Instantly share code, notes, and snippets.

@DanNi0130
Created February 24, 2019 07:09
Show Gist options
  • Save DanNi0130/de361148a4c2d2a0f9fbd05a29aea82f to your computer and use it in GitHub Desktop.
Save DanNi0130/de361148a4c2d2a0f9fbd05a29aea82f to your computer and use it in GitHub Desktop.
IDsearch = re.compile(r'vote\?id=(\d+)&amp') # don’t forget the \ before the ? in the regular expression - certain characters, such as the ? are special in regex and thus need to have an escape character otherwise it will count as part of the regex search
threadIDs = IDsearch.findall(str(cleanpagedata))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment