예제 #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)
예제 #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)
예제 #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)
예제 #4
0
 def get_initial_url(self):
     return utils.make_url(
         payload=self.payload,
         url=self.initial_url)
예제 #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)
예제 #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)
예제 #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)