Advertisement
arxeiss

Python regexp

Feb 12th, 2016
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.29 KB | None | 0 0
  1. def __init__(self):
  2.         self.cookies = None
  3.         self.url = None
  4.         self._source_url = None
  5.         self._url_reg = re.compile("^(?:(?:(https?:)?(//[^/?#]+)))?(/[^?#]+/|/)?([^?#]+)?([^#]*)(.*)$", re.IGNORECASE)
  6.         self._url_groups = [""] * len(self._url_reg.match("").groups())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement