Parse available informations about book from the book details page.

    Args:
        book_url (str): Absolute URL of the book.

    Returns:
        obj: :class:`structures.Publication` instance with book details.
499987
def _process_book(book_url):
    
    data = DOWNER.download(book_url)
    dom = dhtmlparser.parseString(data)

    details_tags = dom.find("div", {"id": "contentDetail"})

    assert details_tags, "Can't find details of the book."

    details = details_tags[0]

    # parse required informations
    title = _parse_title(dom, details)
    authors = _parse_authors(details)
    publisher = _parse_publisher(details)
    price = _parse_price(details)
    pages, binding = _parse_pages_binding(details)

    pub = Publication(
        title,
        authors,
        price,
        publisher
    )

    # parse optional informations
    pub.optionals.URL = book_url
    pub.optionals.binding = binding

    pub.optionals.pages = pages
    pub.optionals.ISBN, pub.optionals.EAN = _parse_ISBN_EAN(details)
    pub.optionals.edition = _parse_edition(details)
    pub.optionals.description = _parse_description(details)

    return pub
310086
def get_page(url):
    
    response = requests.get(url)
    handle_error(response, 200)
    data = response.json()
    return data
14980
def list_books(self):
        '''  '''
        names = []
        try:
            for n in self.cur.execute("SELECT name FROM book;").fetchall():
                names.extend(n)
        except:
            self.error("ERROR: cannot find database table 'book'")
        return(names)
141951
def extract_books
      booklist = []
      if @doc.count != 0
        @doc.each do |book_data|
          book = {}
          book['title'] = book_data['titleMain']
          book['book_url'] = BOOK_URL + book_data['prodId']
          book['crt_time'] = book_data['crtTime'].split(' ')[0]
          booklist << book
        end
      end
      booklist
    end
301783
def use_plenary_book_view(self):
        """"""
        self._book_view = PLENARY
        # self._get_provider_session('comment_book_session') # To make sure the session is tracked
        for session in self._get_provider_sessions():
            try:
                session.use_plenary_book_view()
            except AttributeError:
                pass
679206
def _parse_format_pages_isbn(html_chunk):
    
    ppi = get_first_content(
        html_chunk.find("div", {"class": "price-overflow"})
    )

    if not ppi:
        return None, None, None

    # all information this function should parse are at one line
    ppi = filter(lambda x: x.strip(), ppi.split("<br />"))[0]

    # parse isbn
    isbn = dhtmlparser.parseString(ppi)
    isbn = isbn.find("b")
    isbn = isbn[0].getContent() if isbn else None

    # parse pages and format
    pages = None
    book_format = None
    details = ppi.split("|")

    if len(details) >= 2:
        book_format = details[0].strip()
        pages = details[1].strip()

    return book_format, pages, isbn
877367
def info(self, url, limit=None):
        
        return self._limit_get('api', 'info', params=dict(url=url), limit=limit)
267033
def get_ticker(self):
        
        self._log('get ticker')
        return self._rest_client.get(
            endpoint='/ticker',
            params={'book': self.name}
        )
805037
def _parse_pages_binding(details):
    
    pages = _get_td_or_none(
        details,
        "ctl00_ContentPlaceHolder1_tblRowRozsahVazba"
    )

    if not pages:
        return None, None

    binding = None  # binding info and number of pages is stored in same string
    if "/" in pages:
        binding = pages.split("/")[1].strip()
        pages = pages.split("/")[0].strip()

    if not pages:
        pages = None

    return pages, binding
1294872
def get_books(self):
        
        return itunespy.lookup(id=self.artist_id, entity=itunespy.entities['ebook'])[1:]
176848
def EBook(self, data=None, subset=None):
        """"""
        return self.factory.get_object(jssobjects.EBook, data, subset)
1128606
def parse_bookmark_file (file):
    
    for url, name in parse_bookmark_json(json.load(file)):
        yield url, name
40445
def parse_bookmark_data (data):
    
    name = None
    lineno = 0
    for line in data.splitlines():
        lineno += 1
        line = line.strip()
        if line.startswith("NAME="):
            name = line[5:]
        elif line.startswith("URL="):
            url = line[4:]
            if url and name is not None:
                yield (url, name, lineno)
        else:
            name = None
144403
def process_fulltext_book_detail_page(xml, mArticle)
      article = xml.at '/book-part'
      mArticle.language = article['xml:lang']

      article_meta = article/'./book-meta'
      NihFulltextScraper.extract_idtypes article_meta, mArticle, './book-id'

      chapter_id, chapter_title = NihFulltextScraper.extract_chapter_title article, mArticle

      NihFulltextScraper.extract_authors article_meta, mArticle
      mArticle.article_date = NihFulltextScraper.extract_date article_meta, './pub-date'
      mArticle.jvolume = ScraperBase.node_text article_meta, './volume'
      series = ScraperBase.node_text article_meta, './series'
      mArticle.publication_types << PublicationType.where(name: series).first_or_create unless series.nil?
      NihFulltextScraper.extract_collection article_meta, mArticle
      mArticle.copyright = ScraperBase.node_text article_meta, './/copyright-statement'
      NihFulltextScraper.extract_abstracts article_meta, mArticle
      NihFulltextScraper.extract_sections article, mArticle, './body', chapter_id, chapter_title

    end
245159
def get_publications():
    
    books = []
    for link in get_book_links(LINKS):
        books.append(
            _process_book(link)
        )

    return books
451806
def summary(self):
    '''
    
    '''

    if not getattr(self, '_summary', False):
      query_params = {
        'prop': 'extracts',
        'explaintext': '',
        'exintro': '',
      }
      if not getattr(self, 'title', None) is None:
         query_params['titles'] = self.title
      else:
         query_params['pageids'] = self.pageid

      request = _wiki_request(query_params)
      self._summary = request['query']['pages'][self.pageid]['extract']

    return self._summary
699289
def load_content(self):
        

        # get the toc file from the root file
        rel_path = self.root_file_url.replace(os.path.basename(self.root_file_url), '')
        self.toc_file_url = rel_path + self.root_file.find(id="ncx")['href']
        self.toc_file_soup = bs(self.book_file.read(self.toc_file_url), 'xml')

        # get the book content from the toc file

        for n, c in cross(self.toc_file_soup.find_all('navLabel'), self.toc_file_soup.find_all('content')):
            content_soup = bs(self.book_file.read(rel_path + c.get('src')))
            self.content.append({'part_name': c.text,
                                 'source_url': c.get('src'),
                                 'content_source': content_soup,
                                 'content_source_body': content_soup.body,
                                 'content_source_text': content_soup.body.text})