Get an arbitrary page.

        This resets the iterator and then fully consumes it to return the
        specific page **only**.

        :param str url: URL to arbitrary page results.
13735
async def async_get(self, url):
        
        self.reset()
        self.next_link = url
        return await self.async_advance_page()
171302
def get_narrow_url(self, instance):
        
        text = instance[0]
        request = self.context["request"]
        query_params = request.GET.copy()

        # Never keep the page query parameter in narrowing urls.
        # It will raise a NotFound exception when trying to paginate a narrowed queryset.
        page_query_param = self.get_paginate_by_param()
        if page_query_param and page_query_param in query_params:
            del query_params[page_query_param]

        selected_facets = set(query_params.pop(self.root.facet_query_params_text, []))
        selected_facets.add("%(field)s_exact:%(text)s" % {"field": self.parent_field, "text": text})
        query_params.setlist(self.root.facet_query_params_text, sorted(selected_facets))

        path = "%(path)s?%(query)s" % {"path": request.path_info, "query": query_params.urlencode()}
        url = request.build_absolute_uri(path)
        return serializers.Hyperlink(url, "narrow-url")
1014749
def _get(self, url):
        
        return self.session.get(self.READ_URL_PRE + url).json()
300298
def url_to_string(url):
    
    try:
        page = urllib2.urlopen(url)
    except (urllib2.HTTPError, urllib2.URLError) as err:
        ui.error(c.MESSAGES["url_unreachable"], err)
        sys.exit(1)

    return page
1287171
def get_page_text_url(self, page):
        
        template = self.resources.page.get('text')
        url = template.replace("{page}", str(page))
        return url
247392
def get(self, url, status):
        

        # consistently faster than requests by 3x
        #
        # r = requests.get(url,
        #                  headers={'User-Agent': self.user_agent})
        # return r.text

        crl = self.cobj

        try:
            crl.setopt(pycurl.URL, url)
        except UnicodeEncodeError:
            crl.setopt(pycurl.URL, url.encode('utf-8'))

        if not self.silent:
            print(status, file=sys.stderr)

        if self.DISABLED:
            print("Requests DISABLED", file=sys.stderr)
        else:
            return self.curl_perform(crl)
466144
def get_url(self, url):
        
        _r = self.br.open(url)

        # check that we've not been redirected to the login page
        if self.br.geturl().startswith(self.AUTH_URL):
            raise AuthRequiredException
        elif self.br.geturl().startswith(self.ERROR_URL):
            raise RequestErrorException
        else:
            return _r.read()
590059
def get_full_url(self, url):
        # type: (str) -> str
        
        request = Request('GET', url)
        preparedrequest = self.session.prepare_request(request)
        return preparedrequest.url
347943
def get_url(url: str) -> Union[dict, int, float, str]:
        ''''''

        request = Request(url, headers={"User-Agent": "pypeerassets"})
        response = cast(HTTPResponse, urlopen(request))
        if response.status != 200:
            raise Exception(response.reason)
        return json.loads(response.read().decode())
1166223
def _get_pages(self, locations, project_name):
        # type: (Iterable[Link], str) -> Iterable[HTMLPage]
        
        seen = set()  # type: Set[Link]
        for location in locations:
            if location in seen:
                continue
            seen.add(location)

            page = _get_html_page(location, session=self.session)
            if page is None:
                continue

            yield page
59690
def get_url(url, parser='html'):
    
    url = request.quote(url, safe=':/?=&')
    logger.debug('URL: %s', url)
    req = request.Request(url, headers={'User-Agent': 'foobar'})
    try:
        response = request.urlopen(req)
    except HTTPError:
        raise
    except (ssl.SSLError, URLError):
        # Some websites (like metal-archives) use older TLS versions and can
        # make the ssl module trow a VERSION_TOO_LOW error. Here we try to use
        # the older TLSv1 to see if we can fix that
        context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
        response = request.urlopen(req, context=context)

    response = response.read()
    if parser == 'html':
        return BeautifulSoup(response, 'html.parser', from_encoding='utf-8')
    elif parser == 'json':
        return json.loads(response)
    elif parser == 'raw':
        return response.decode()
    raise ValueError('Unrecognized parser')
678240
def url(self, var, default=NOTSET):
        
        return self.get_value(var, cast=urlparse, default=default, parse_default=True)
406145
def get_instance(url, pagination_index=0, options={})
      resps = [self.get_page(url, @debug, options)]
      pagination_index = pagination_index.to_i
      prev_url = url
      while !resps.last.empty?
        next_url = self.next_instance_page_url(url, pagination_index + 1)
        break if next_url == prev_url || next_url.empty?

        next_resp = self.get_page(next_url, @debug, options)
        prev_url = next_url
        resps << next_resp
      end
      resps
    end
1244103
def get(self, url, params=dict()):
        
        try:
            res = requests.get(url, headers=self.headers, params=params)
            return json.loads(res.text)
        except Exception as e:
            print(e)
            return "error"
314710
def get_url(url, catch_exception=False):
    
    return _get_url(url, catch_exception, urlopen=urllib2.urlopen)
733456
def process_url(self, page_num, page_size, url):
        
        params = dict()
        if page_num is not None:
            url = re.sub('page=\d+', '', url)
            params['page'] = page_num
        if page_size is not None:
            url = re.sub('per_page=\d+', '', url)
            params['per_page'] = page_size
        return params, url
1059059
def page_url(self, page):
        '''
        
        '''
        if page is not None and page != 1:
            return self.url.qs_set(**{self.page_param: page})
        elif page is not None:
            return self.url.qs_delete('page')