Skip to content

Podcast Search and Scrape XML via Itunes and Digital Podcast

License

Notifications You must be signed in to change notification settings

tzsk/scrape-pod

Folders and files

NameName
Last commit message
Last commit date

Latest commit

f99096e · Jan 21, 2021

History

15 Commits
Nov 8, 2017
Nov 8, 2017
Oct 29, 2017
Oct 29, 2017
Oct 29, 2017
Oct 29, 2017
Jan 21, 2021
Oct 29, 2017
Oct 29, 2017
Oct 29, 2017
Oct 29, 2017
Oct 29, 2017
Oct 29, 2017
Nov 4, 2017
Oct 29, 2017
Oct 29, 2017

Repository files navigation

Scrape Pod

Latest Version on Packagist Software License Build Status StyleCI Quality Score Total Downloads

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.