Find and get page by its name

        :param name: Name of the page
        :return: :class:`models.Page` objects, ordered by relevance
        :rtype: list
        :raises: FBchatException if request failed
506545
def searchForPages(self, name, limit=10):
        
        params = {"search": name, "limit": limit}
        j = self.graphql_request(GraphQL(query=GraphQL.SEARCH_PAGE, params=params))

        return [Page._from_graphql(node) for node in j[name]["pages"]["nodes"]]
204170
def get_page(n)
            raise IndexError, "Page numbers are referenced starting from 1" if n < 1
            raise IndexError, "Page not found" if n > self.Count.to_i

            self.each_page.lazy.drop(n - 1).first or raise IndexError, "Page not found"
        end
608142
def get_pokemon_by_name(self, name):
        
        endpoint = '/pokemon/' + str(name)
        return self.make_request(self.BASE_URL + endpoint)
1130959
def search_by_name(cls, query, name):
        
        query = query.filter(db.or_(cls.first_name.contains(name),
                                    cls.last_name.contains(name)))
        return query
932689
def next_page(self):
        
        try:
            next_url = self.next_url
        except AttributeError:
            raise PageError("Page %r has no next page" % self)
        return self.page_for_url(next_url)
1184025
def _find_wikipedia_names(self, name_en):
        
        url = 'https://en.wikipedia.org/w/api.php'
        params = {'action': 'query',
                  'titles': name_en,
                  'prop': 'langlinks',
                  'lllimit': 500,
                  'format': 'json'}
        r = requests.get(url, params=params)
        if not r:
            raise ValueError('Could not find wikipedia page: {0}'.format(name_en))
        out = r.json()

        names = {}
        pages = out['query']['pages']
        for page in pages:
            for langlink in pages[page].get('langlinks', []):
                names[langlink['lang']] = langlink['*']

        return names
702853
def get_pages(self, label=None):
        """"""
        return (
            page for page in sorted(
                self._pages.values(), key=lambda i: i.created, reverse=True
            ) if ((not label or label in page.labels) and page.visible)
        )
956741
def get_catalog_by_name(name):
    
    kwargs = {
            'name' : name,
        }
    result = util.callm("%s/%s" % ('catalog', 'profile'), kwargs)
    return Catalog(**util.fix(result['response']['catalog']))
619188
def open_subreddit_page(self, name):
        
        from .subreddit_page import SubredditPage

        with self.term.loader('Loading subreddit'):
            page = SubredditPage(self.reddit, self.term, self.config,
                                 self.oauth, name)
        if not self.term.loader.exception:
            return page
1100398
def get(self, name):
        
        parameter = next((p for p in self.parameters if p.name == name), None)
        if parameter is None:
            raise LookupError("Cannot find parameter '" + name + "'.")
        return parameter
735186
def get_page_text(self, page):
        
        url = self.get_page_text_url(page)
        return self._get_url(url)
32457
def get_related(page):
    
    related = []
    entry   = Entry.get_for_model(page)

    if entry:
        related = entry.related

    return related
1216047
def by_name(queryset, name=None):
  
  if name:
    queryset = queryset.filter(name=name)
  return queryset
252651
def get(self, name):
        
        # do import here to keep soft dependency
        import requests

        # append base url to requested name
        url = urljoin(self.base_url, name)
        # fetch the data from the remote url
        response = requests.get(url)
        # return the bytes of the response
        return response.content
198183
def get_id_by_name(api, search_name):
    
    entities = api.get_all(q='name==' + "'" + search_name + "'").content
    if entities:
        return entities[0].id
    return
183884
def get_page_objects_by_type(context, object_type):
    
    try:
        objects = context['page']['content'][object_type]
    except KeyError:
        raise template.TemplateSyntaxError('wrong content type: {0:>s}'.format(object_type))
    return objects
1095371
def get_sdc_by_name(self, name):
        
        for sdc in self.sdc:
            if sdc.name == name:
                return sdc
        raise KeyError("SDC of that name not found")