tzsk / scrape-pod
Search Podcast with Itunes and Digital Podcast. Podcast XML Scraper and Parser
Requires
- php: ~5.6|~7.0
- illuminate/support: ~5.1
Requires (Dev)
- phpunit/phpunit: >=5.4.3
- squizlabs/php_codesniffer: ^2.3
This package is auto-updated.
Last update: 2024-10-29 05:16:26 UTC
README
Scrape Pod is a Podcast Searching and XML parsing tool. You can search podcasts from Itunes
or DigitalPodcast
. This tool is designed for Laravel 5.1 and above but this can be used outside laravel as well.
Install
Via Composer
$ composer require tzsk/scrape-pod
Configure
If you are using Laravel 5.4 or Below you need to perform following steps to configure.
And if you are using this package outside Laravel then you don't have to perform these steps.
In your config/app.php
file place the Provider and alias like so.
'providers' => [ ... Tzsk\ScrapePod\Provider\ScrapePodServiceProvider::class, ... ], 'aliases' => [ ... 'ScrapePod' => Tzsk\ScrapePod\Facade\ScrapePod::class, ... ],
Usage with Laravel
Searching Example:
At the top of any file use the namespace
;
... use Tzsk\ScrapePod\Facade\ScrapePod; ...
Now, inside any method use it like this:
$response = ScrapePod::search("Laravel"); $response = ScrapePod::find("936914258"); # Works only with itunes. # OR $response = ScrapePod::limit(15)->search("Laravel"); # OR use Digital Podcast to Search. $response = ScrapePod::digitalPodcast()->search("Laravel"); $response = ScrapePod::digitalPodcast()->limit(15)->search("Laravel");
XML Parsing Example:
From the search results you can find the rss
feed url. You can use that URL or any other Feed URL you want.
$data = ScrapePod::feed($feedURL);
This will give you the Sraped Result Set of any information found on that Feed URL.
Usage outside Laravel
At the top of any file use the namespace
;
... use Tzsk\ScrapePod\ScrapePodcast; ...
Now, inside any method use it like this:
$scraper = new ScrapePodcast(); $response = $scraper->search("Laravel"); # OR $response = $scraper->limit(15)->search("Laravel"); # OR use Digital Podcast to Search. $response = $scraper->digitalPodcast()->search("Laravel"); $response = $scraper->digitalPodcast()->limit(15)->search("Laravel");
XML Parsing Example:
From the search results you can find the rss
feed url. You can use that URL or any other Feed URL you want.
$data = $scraper->feed($feedURL);
This will give you the Sraped Result Set of any information found on that Feed URL.
Change log
Please see CHANGELOG for more information on what has changed recently.
Testing
$ composer test
Contributing
Please see CONTRIBUTING and CODE_OF_CONDUCT for details.
Security
If you discover any security related issues, please email mailtokmahmed@gmail.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.