Python package for convenient work with Google Books service
Project description
PyGoogleBooks
Python package for convenient work with Google Books service
Author: tankalxat34
Installing
Perform this command in your console:
pip install PyGoogleBooks
How to use?
Create new python-file and paste here this code:
import PyGoogleBooks
gb = PyGoogleBooks.GoogleBook("buc0AAAAMAAJ", w=1280)
print(gb.name)
print(gb.authors)
print(gb.description)
print(gb.url)
print(gb.cover_link)
print(gb.get_link_to_page(page_number=5))
print(gb.get_pages(last_page_number=20, ignore_errors=True))
On your console you will see something like this:
Adventures of Sherlock Holmes
['Sir Arthur Conan Doyle']
Presenting 12 tales starring the legendary British detective Sherlock Holmes, this 1892 book is Arthur Conan Doyle's first short-story collection. The mystery compilation includes some of Holmes's finest cases with his dutiful sidekick, Doctor Watson, most notably "A Scandal in Bohemia," in which Holmes matches wits with the crafty former lover of a European king. Also featured is "The Adventure of the Red-Headed League," a study in misdirection that unfolds to become a much larger scheme. The stories, initially published in the Strand Magazine, are essential reading for Holmes fans.
https://books.google.ru/books?id=buc0AAAAMAAJ
https://books.google.ru/books/content?id=buc0AAAAMAAJ&hl=ru&pg=PP1&img=1&zoom=3&sig=ACfU3U2f3KG48wGY0dIFmWduClK503ONtw&w=1280
https://books.google.ru/books/content?id=buc0AAAAMAAJ&hl=ru&pg=PP5&img=1&zoom=3&sig=ACfU3U3Q2Ps0b6zInwuZwbABbYEz3b3LeA&w=1280
['https://books.google.ru/books/content?id=buc0AAAAMAAJ&hl=ru&pg=PP1&img=1&zoom=3&sig=ACfU3U2f3KG48wGY0dIFmWduClK503ONtw&w=1280', 'https://books.google.ru/books/content?id=buc0AAAAMAAJ&hl=ru&pg=PP1&img=1&zoom=3&sig=ACfU3U2f3KG48wGY0dIFmWduClK503ONtw&w=1280', 'https://books.google.ru/books/content?id=buc0AAAAMAAJ&hl=ru&pg=PP2&img=1&zoom=3&sig=ACfU3U01RzV-6aIu0MGrrEzHZAQrozv8Rw&w=1280', 'https://books.google.ru/books/content?id=buc0AAAAMAAJ&hl=ru&pg=PP3&img=1&zoom=3&sig=ACfU3U06HM0NZV1SQMNoTrUWcPLrRQc8VA&w=1280', 'https://books.google.ru/books/content?id=buc0AAAAMAAJ&hl=ru&pg=PP4&img=1&zoom=3&sig=ACfU3U1g6vMWtZuD9l9hkSMKyiYlH_UJ4A&w=1280', 'https://books.google.ru/books/content?id=buc0AAAAMAAJ&hl=ru&pg=PP5&img=1&zoom=3&sig=ACfU3U3Q2Ps0b6zInwuZwbABbYEz3b3LeA&w=1280', 'https://books.google.ru/books/content?id=buc0AAAAMAAJ&hl=ru&pg=PP6&img=1&zoom=3&sig=ACfU3U3mmAwNiygsD_C2JuC51Kq3Iwyw5g&w=1280', 'https://books.google.ru/books/content?id=buc0AAAAMAAJ&hl=ru&pg=PP7&img=1&zoom=3&sig=ACfU3U1RAlruEwGA58GirNGbrMLA2qc-dg&w=1280', 'https://books.google.ru/books/content?id=buc0AAAAMAAJ&hl=ru&pg=PP8&img=1&zoom=3&sig=ACfU3U2JFIBVBEuS9FKoP0eC9btV3pv8FQ&w=1280', 'https://books.google.ru/books/content?id=buc0AAAAMAAJ&hl=ru&pg=PP9&img=1&zoom=3&sig=ACfU3U2atbA03pfB5XJmGelBhjFrT27AUw&w=1280', 'https://books.google.ru/books/content?id=buc0AAAAMAAJ&hl=ru&pg=PP10&img=1&zoom=3&sig=ACfU3U1-TbSar4RZsKlXOvfIVbt0lBUrVQ&w=1280', 'https://books.google.ru/books/content?id=buc0AAAAMAAJ&hl=ru&pg=PP11&img=1&zoom=3&sig=ACfU3U2j_AAamXcyIyUqD4Vv4KXwvvfIdA&w=1280', 'https://books.google.ru/books/content?id=buc0AAAAMAAJ&hl=ru&pg=PP12&img=1&zoom=3&sig=ACfU3U0r-eSk6WOQ7tYNxboBVfPGD1mDrg&w=1280', 'https://books.google.ru/books/content?id=buc0AAAAMAAJ&hl=ru&pg=PP13&img=1&zoom=3&sig=ACfU3U3RcALH5OiLk-toTwXluli3fe9XRw&w=1280', 'https://books.google.ru/books/content?id=buc0AAAAMAAJ&hl=ru&pg=PP14&img=1&zoom=3&sig=ACfU3U3q65-L5vRMitbQiUaVcmhqZNWKIg&w=1280', 'https://books.google.ru/books/content?id=buc0AAAAMAAJ&hl=ru&pg=PP15&img=1&zoom=3&sig=ACfU3U33A2PJvWbTDDtY_5NCSQHZPmV09w&w=1280', 'https://books.google.ru/books/content?id=buc0AAAAMAAJ&hl=ru&pg=PP16&img=1&zoom=3&sig=ACfU3U0jO8UXw4XIcUH0pje3BvhJ6lFSxQ&w=1280', 'https://books.google.ru/books/content?id=buc0AAAAMAAJ&hl=ru&pg=PP17&img=1&zoom=3&sig=ACfU3U2PEW_I7pt66RaVY3yoNGdDIgYJJg&w=1280', 'https://books.google.ru/books/content?id=buc0AAAAMAAJ&hl=ru&pg=PP18&img=1&zoom=3&sig=ACfU3U05hN0R4D-8Sl2n3O1Br-gcWdxUbQ&w=1280', 'https://books.google.ru/books/content?id=buc0AAAAMAAJ&hl=ru&pg=PP19&img=1&zoom=3&sig=ACfU3U3GSDXF0TG1C0HehN69WK2alsBcDw&w=1280']
Examples
Get pages from book:
import PyGoogleBooks
gb = PyGoogleBooks.GoogleBook("buc0AAAAMAAJ", w=1280)
pages = gb.get_pages(last_page_number=307, ignore_errors=True)
print(pages)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
PyGoogleBooks-0.1.1.tar.gz
(5.8 kB
view details)
Built Distribution
File details
Details for the file PyGoogleBooks-0.1.1.tar.gz
.
File metadata
- Download URL: PyGoogleBooks-0.1.1.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.10.4 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 888885a18d9d68956a1be8f1d5173e2706ff79f5b1591ce71dcc7cb3bb0125c2 |
|
MD5 | 76a768a74265966775c9d350ac7ad89e |
|
BLAKE2b-256 | 0fbf1c25757debe4317b76f630c9085ce15cbd7363118e2ee5ac5fbf33931530 |
File details
Details for the file PyGoogleBooks-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: PyGoogleBooks-0.1.1-py3-none-any.whl
- Upload date:
- Size: 5.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.10.4 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 590d53b44b28c15eec122707b4e1a40973b70f76b0eb87e8a83ddd1904cc61d9 |
|
MD5 | 5949ab19fec8a1140bbb5fdcb38aaf9f |
|
BLAKE2b-256 | 993ca760d8b6c7d496893cec9b1fc24bb9cb5a0e359bab8ff2cbc7fcbd843d7f |