def extract(self, arg, from_response=None):
    if from_response:
      if self.response:
        return self.response.extract(arg)
      return None
    if hasattr(self, arg):
      return getattr(self, arg)
    h = self.get_header(arg)
    if h:
      return h[0]
    if self.query:
      query = parse_qs(self.query)
      if arg in query:
        return query[arg][0]
    if self.content:
      post = parse_qs(self.content)
      if arg in post:
        return post[arg][0]
    try:
      for c in self.cookies:
        if c.name == arg:
          return c.value
    except CookieException:
      pass
    if from_response is None and self.response:
      return self.response.extract(arg)
Extract a particular field of the request.
dataset/ETHPy150Open tweksteen/burst/burst/http.py/Request.extract