load the basic page information
975054
def __load(self, redirect=True, preload=False):
        
        query_params = {
            "prop": "info|pageprops",
            "inprop": "url",
            "ppprop": "disambiguation",
            "redirects": "",
        }
        query_params.update(self.__title_query_param())

        request = self.mediawiki.wiki_request(query_params)

        query = request["query"]
        pageid = list(query["pages"].keys())[0]
        page = query["pages"][pageid]

        # determine result of the request
        # missing is present if the page is missing
        if "missing" in page:
            self._raise_page_error()
        # redirects is present in query if page is a redirect
        elif "redirects" in query:
            self._handle_redirect(redirect, preload, query, page)
        # if pageprops is returned, it must be a disambiguation error
        elif "pageprops" in page:
            self._raise_disambiguation_error(page, pageid)
        else:
            self.pageid = pageid
            self.title = page["title"]
            self.url = page["fullurl"]
258321
def load(self):
    
    media_page = self.session.session.get(u'http://myanimelist.net/' + self.__class__.__name__.lower() + u'/' + str(self.id)).text
    self.set(self.parse(utilities.get_clean_dom(media_page)))
    return self
896329
def show_loading_page(self):
        """"""
        loading_template = Template(LOADING)
        loading_img = get_image_path('loading_sprites.png')
        if os.name == 'nt':
            loading_img = loading_img.replace('\\', '/')
        message = _("Connecting to kernel...")
        page = loading_template.substitute(css_path=CSS_PATH,
                                           loading_img=loading_img,
                                           message=message)
        self.setHtml(page)
1035178
public void loadNextPage() {
        this.currentPage = cachedPage;
        cachedPage = null;
        this.items.addAll(currentPage.items());
        cachePage(currentPage.nextPageLink());
    }
1138728
def pages(self):
        """"""
        rev = self.db.get('site:rev')
        if int(rev) != self.revision:
            self.reload_site()

        return self._pages
453134
def add_page(self, page, default = True):
        
        """
        self._pages[page.page_id] = page
        page._add_display(self)
        if default or not self._active_page:
            self._active_page = page
927027
def load_info(self):
        '''  '''
        headers = {"Content-type": "application/x-www-form-urlencoded","Accept": "text/plain",'Referer': 'http://'+self.domain+'/login.phtml',"User-Agent": user_agent}
        req = self.session.get('http://'+self.domain+'/team_news.phtml',headers=headers).content
        soup = BeautifulSoup(req)
        self.title = soup.title.string
        
        estado = soup.find('div',{'id':'content'}).find('div',{'id':'manager'}).string
        if estado:
            print estado.strip()
            return

        [s.extract() for s in soup('strong')]
        if (soup.find('div',{'id':'userid'}) != None):
            self.myid = soup.find('div',{'id':'userid'}).p.text.strip()[2:]
            self.money = int(soup.find('div',{'id':'manager_money'}).p.text.strip().replace(".","")[:-2])
            self.teamvalue = int(soup.find('div',{'id':'teamvalue'}).p.text.strip().replace(".","")[:-2])
            self.community_id = soup.find('link')['href'][24:]
            self.username = soup.find('div',{'id':'username'}).p.a.text
343948
function (data) {
	// console.log('data', data);
	if (data && data.datahref) {
		loadAjaxPage({
			datahref: data.datahref,
			pushState: false
		});
	}
}
766103
def _load(self, keyframe=True):
        """"""
        if self._cached:
            return
        pages = self.pages
        if not pages:
            return
        if not self._indexed:
            self._seek(-1)
        if not self._cache:
            return
        fh = self.parent.filehandle
        if keyframe is not None:
            keyframe = self._keyframe
        for i, page in enumerate(pages):
            if isinstance(page, inttypes):
                fh.seek(page)
                page = self._tiffpage(self.parent, index=i, keyframe=keyframe)
                pages[i] = page
        self._cached = True
1145879
def page_prev(self):
        """"""
        window_start = (self.parent.value('window_start') -
                        self.parent.value('window_length'))
        if window_start < 0:
            return
        self.parent.overview.update_position(window_start)
1095991
def starter(cls):
        """"""
        archive = cls.url + 'archive.html'
        data = getPageContent(archive, cls.session)
        search = compile(tagre("a", "href", r"(\d\d\d\d-\d\d.html)"))
        archivepages = search.findall(data)
        return cls.url + archivepages[-1]
136519
def parse_page(page):
    """"""
    colors = get_config()['colors']
    with io.open(page, encoding='utf-8') as f:
        lines = f.readlines()
    output_lines = []
    for line in lines[1:]:
        if is_headline(line):
            continue
        elif is_description(line):
            output_lines.append(click.style(line.replace('>', ' '),
                                            fg=colors['description']))
        elif is_old_usage(line):
            output_lines.append(click.style(line, fg=colors['usage']))
        elif is_code_example(line):
            line = '  ' + line if line.startswith('`') else line[2:]
            output_lines.append(click.style(line.replace('`', ''),
                                            fg=colors['command']))
        elif is_line_break(line):
            output_lines.append(click.style(line))
        else:
            output_lines.append(click.style('- ' + line, fg=colors['usage']))
    return output_lines
13979
def _load(self, slug):
        
        #here we know that the slug exists
        self._slug = slug
        page_dir = os.path.join(self.site.dirs['source'], self._slug)
        page_file_name = os.path.join(page_dir, self._slug + '.md')
        self._dirs['source_dir'] = page_dir
        self._dirs['source_filename'] = page_file_name
        self._dirs['www_dir'] = os.path.join(self.site.dirs['www'], slug)
        self._dirs['www_filename'] = os.path.join(self._dirs['www_dir'],  'index.html')

        #pf = open(self._dirs['source_filename'], 'r')
        #page_text = pf.read()
        #pf.close()
        # need to decode!
        pf = codecs.open(self._dirs['source_filename'], mode="r", encoding="utf-8")
        page_text = pf.read()
        pf.close()

        self._parse_text(page_text)
        if not self._check_config():
            raise ValueError
            #sys.exit()
        self._title = self._config['title'][0]
894840
def get_page(self, start_element=0, num_elements=None):
        """"""
        if num_elements is None:
            num_elements = self.batch_size
        specs = self.specs.copy()
        specs.update(start_element=start_element, num_elements=num_elements)
        return self.client.get(self.service_name, **specs)
834696
private void initPageData() {

        m_elementInstances = new HashMap<String, CmsContainerElementBean>();
        m_parentContainers = new HashMap<String, CmsContainerBean>();
        if (m_page != null) {
            for (CmsContainerBean container : m_page.getContainers().values()) {
                for (CmsContainerElementBean element : container.getElements()) {
                    m_elementInstances.put(element.getInstanceId(), element);
                    m_parentContainers.put(element.getInstanceId(), container);
                    try {
                        if (element.isGroupContainer(m_cms) || element.isInheritedContainer(m_cms)) {
                            List<CmsContainerElementBean> children;
                            if (element.isGroupContainer(m_cms)) {
                                children = CmsJspTagContainer.getGroupContainerElements(
                                    m_cms,
                                    element,
                                    m_request,
                                    container.getType());
                            } else {
                                children = CmsJspTagContainer.getInheritedContainerElements(m_cms, element);
                            }
                            for (CmsContainerElementBean childElement : children) {
                                m_elementInstances.put(childElement.getInstanceId(), childElement);
                                m_parentContainers.put(childElement.getInstanceId(), container);
                            }
                        }
                    } catch (CmsException e) {
                        LOG.error(e.getLocalizedMessage(), e);
                    }
                }
            }
            // also add detail only data
            if (m_detailOnlyPage != null) {
                for (CmsContainerBean container : m_detailOnlyPage.getContainers().values()) {
                    for (CmsContainerElementBean element : container.getElements()) {
                        m_elementInstances.put(element.getInstanceId(), element);
                        m_parentContainers.put(element.getInstanceId(), container);
                    }
                }
            }
        }
    }
162227
function readPages() {
        $params = $this->getObjectVal($this->xref['trailer'][1]['/Root']);
        $objref = null;
        foreach ($params[1][1] as $k=>$v) {
            if ($k == '/Pages') {
                $objref = $v;
                break;
            }
        }
        if ($objref == null || $objref[0] !== PDF_TYPE_OBJREF) {
            // Offset not found.
            return;
        }

        $dict = $this->getObjectVal($objref);
        if ($dict[0] == PDF_TYPE_OBJECT && $dict[1][0] == PDF_TYPE_DICTIONARY) {
            // Dict wrapped in an object
            $dict = $dict[1];
        }

        if ($dict[0] !== PDF_TYPE_DICTIONARY) {
            return;
        }

        $this->pages = array();
        if (isset($dict[1]['/Kids'])) {
            $v = $dict[1]['/Kids'];
            if ($v[0] == PDF_TYPE_ARRAY) {
                foreach ($v[1] as $ref) {
                    $page = $this->getObjectVal($ref);
                    $this->readPage($page);
                }
            }
        }

        $this->page_count = count($this->pages);
    }
310164
def _load_info(self):
        
        myself = self.get_me()
        if self.return_python_objects:
            self._id = myself.id
            self._username = myself.username
        else:
            self._id = myself["result"]["id"]
            self._username = myself["result"]["username"]