https://github.com/alphabox/packtub-crawler
A simple PHP library to crawl your ebooks from packtub.com (https://www.packtpub.com/packt/offers/free-learning)
https://github.com/alphabox/packtub-crawler
ebook-downloader packtpub php
Last synced: 7 months ago
JSON representation
A simple PHP library to crawl your ebooks from packtub.com (https://www.packtpub.com/packt/offers/free-learning)
- Host: GitHub
- URL: https://github.com/alphabox/packtub-crawler
- Owner: alphabox
- License: apache-2.0
- Created: 2017-10-07T21:18:03.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2018-02-25T20:59:11.000Z (over 8 years ago)
- Last Synced: 2023-07-15T02:35:27.470Z (about 3 years ago)
- Topics: ebook-downloader, packtpub, php
- Language: PHP
- Homepage:
- Size: 15.6 KB
- Stars: 3
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# packtub-crawler
## Introduction
packtub-crawler is a simple, minimalistic PHP library to crawl your ebooks from https://www.packtpub.com.
You can list your available books, and download those in different formats with source code (if available).
## Installation
Install the latest version with
```bash
$ composer require alphabox/packtub-crawler
```
## Usage
A simple usage example to list your all available ebook.
```php
pushHandler(new StreamHandler('php://stdout', Logger::DEBUG));
//Login to Packtub site
$logger->info("Login to packtub.com");
$packtub = new PacktubSite($logger);
$packtub->login('user@example.com', "supersecretpassword");
$logger->info("Get and list available books.");
foreach( $packtub->getAvailableBooks() as $title => $formats ) {
$logger->info($title);
}
?>
```
## License
This project licensed under Apache 2.0 License - see the [LICENSE](LICENSE) file for details