GithubHelp home page GithubHelp logo

tzsk / scrape-pod Goto Github PK

View Code? Open in Web Editor NEW
8.0 4.0 0.0 29 KB

Podcast Search and Scrape XML via Itunes and Digital Podcast

License: MIT License

PHP 100.00%
laravel laravel-5-package podcast xml-parser podcast-search itunes-podcast-feed

scrape-pod's Introduction

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 [email protected] instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

scrape-pod's People

Contributors

tzsk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

scrape-pod's Issues

Searching on PHP and HTML causes error

Detailed description

This issue is a bug. When you search on php or html

$response = ScrapePod::search("php");

you get a return value of

"status" => false
"message" => "Undefined property: stdClass::$feedUrl"

This is happening in php 7.1 on windows 10.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.