Exemple #1
0
    def get(self, selector, action_url, payload):

        # Get the url with the QuerySrings informed by payload
        url = utils.make_url(url=action_url, payload=payload)

        # Makes a GET request
        return http.Request(url=url, callback=self.wrap_response)
Exemple #2
0
    def get_search_url(self, method):

        if method == 'POST':
            return self.search_url

        return utils.make_url(
            payload=self.payload,
            url=self.search_url)
Exemple #3
0
    def get_initial_url(self):

        # Makes the url with the payload
        # If the initial_url was defined in the spider
        initial_url = self.spider.get_initial_url()
        payload = self.spider.get_payload()

        if not initial_url:
            return None

        return utils.make_url(url=initial_url, payload=payload)
Exemple #4
0
 def get_initial_url(self):
     return utils.make_url(
         payload=self.payload,
         url=self.initial_url)
Exemple #5
0
 def http_get(self, request_url, payload, **options):
     url = utils.make_url(url=request_url, payload=payload)
     return http.Request(url=url, **options)
Exemple #6
0
 def http_get(self, request_url, payload, **options):
     url = utils.make_url(url=request_url, payload=payload)
     return http.Request(url=url, **options)
Exemple #7
0
 def get_initial_url(self):
     initial_url = self.initial_url or self.spider.get_initial_url()
     payload = self.get_payload()
     return utils.make_url(url=initial_url, payload=payload)