Get content of the page through url.
194040
def get_content(self):
        """"""
        url = self.build_url()
        try:
            self.content_page = requests.get(url)
            if not(self.content_page.status_code == requests.codes.ok):
                self.content_page.raise_for_status()
        except requests.exceptions.RequestException as ex:
            logging.info('A requests exception has ocurred: ' + str(ex))
            logging.error(traceback.format_exc())
            sys.exit(0)
964504
async def get_data(self, path, headers=None, timeout=None):
        """"""
        url = self.base_url + path
        _LOGGER.debug('GET URL: %s', url)
        resp = None
        try:
            resp = await self._session.get(
                url, headers=headers,
                timeout=DEFAULT_TIMEOUT if timeout is None else timeout)
            if resp.content_length is not None:
                resp_data = await resp.read()
            else:
                resp_data = None
            return resp_data, resp.status
        except Exception as ex:
            if resp is not None:
                resp.close()
            raise ex
        finally:
            if resp is not None:
                await resp.release()
304173
def getPageInfo(self, comic, url):
        """"""
        comicData = self.getComicData(comic)
        if url not in comicData['pages']:
            comicData['pages'][url] = {'images':{}}
        return comicData['pages'][url]
908535
def page_url(self) -> str:
        """"""
        url = self.attributes['canonicalurl']
        assert isinstance(url, str)
        return url
735186
def get_page_text(self, page):
        
        url = self.get_page_text_url(page)
        return self._get_url(url)
43403
def url(self, var, default=NOTSET, force=True):
        """"""
        return self._get(var, default=default, cast=urlparse.urlparse,
                         force=force)
124431
def _get_url(url):
    """"""
    try:
        data = HTTP_SESSION.get(url, stream=True)
        data.raise_for_status()
    except requests.exceptions.RequestException as exc:
        raise FetcherException(exc)

    return data
445971
def _get_html(self, url):
        
        self.log.info(u"/GET {}".format(url))
        r = requests.get(url)
        if hasattr(r, 'from_cache'):
            if r.from_cache:
                self.log.info("(from cache)")

        if r.status_code != 200:
            throw_request_err(r)

        return r.content
1014749
def _get(self, url):
        
        return self.session.get(self.READ_URL_PRE + url).json()
1062539
def _GetURLContent(url):
    """"""
    response = urllib_request.urlopen(url)
    encoding = response.info().get('Content-Encoding')
    if encoding == 'gzip':
        content = _Gunzip(response.read())
    else:
        content = response.read()
    return content
594792
def content(self):
        """"""
        return _content.Content(url=self._url + "/content",
                                securityHandler=self._securityHandler,
                                proxy_url=self._proxy_url,
                                proxy_port=self._proxy_port)
1142969
def get_content(session, urls):
    

    content = ""
    for url in urls:
        try:
            logger.debug("GET changelog from {url}".format(url=url))
            if "https://api.github.com" in url and url.endswith("releases"):
                # this is a github API release page, fetch it if token is set
                if not GITHUB_API_TOKEN:
                    logger.warning("Fetching release pages requires CHANGELOGS_GITHUB_API_TOKEN "
                                   "to be set")
                    continue
                resp = session.get(url, headers={
                    "Authorization": "token {}".format(GITHUB_API_TOKEN)
                })
                if resp.status_code == 200:
                    for item in resp.json():
                        content += "\n\n{}\n{}".format(item['tag_name'], item["body"])
            else:
                resp = session.get(url)
                if resp.status_code == 200:
                    content += "\n\n" + resp.text
        except requests.ConnectionError:
            pass
    return content
637933
def read_content (self):
        """"""
        if self.is_directory():
            data = get_index_html(get_files(self.get_os_filename()))
            if isinstance(data, unicode):
                data = data.encode("iso8859-1", "ignore")
        else:
            data = super(FileUrl, self).read_content()
        return data
1362179
def content(self):
        """"""
        return _bfd.section_get_content(self.bfd, self._ptr, 0, self.size)
1121731
def go_to(self, url_or_text):
        """"""
        if is_text_string(url_or_text):
            url = QUrl(url_or_text)
        else:
            url = url_or_text
        self.webview.load(url)
1119592
def get(url, params = {})
      result({"ResponseGroup" => "Related,TrafficData,ContentData", "Url" => url}, params) do |doc|
        @document = doc

        {
          speed_median_load_time:       speed_median_load_time,
          speed_load_percentile:        speed_load_percentile,
          link_count:                   link_count,
          ranking:                      ranking,
          ranking_delta:                ranking_delta,
          reach_rank:                   reach_rank,
          reach_rank_delta:             reach_rank_delta,
          reach_per_million:            reach_per_million,
          reach_per_million_delta:      reach_per_million_delta,
          page_views_rank:              page_views_rank,
          page_views_rank_delta:        page_views_rank_delta,
          page_views_per_million:       page_views_per_million,
          page_views_per_million_delta: page_views_per_million_delta,
          page_views_per_user:          page_views_per_user,
          page_views_per_user_delta:    page_views_per_user_delta
        }
      end
    end
47559
def get_content (self):
        """"""
        if self.data is None:
            log.debug(LOG_CHECK, "Get content of %r", self.url)
            t = time.time()
            self.data = self.read_content()
            self.size = len(self.data)
            self.dltime = time.time() - t
            if self.size == 0:
                self.add_warning(_("Content size is zero."),
                             tag=WARN_URL_CONTENT_SIZE_ZERO)
            else:
                self.aggregate.add_downloaded_bytes(self.size)
        return self.data