项目作者: bilginpro

项目描述 :
A crawler for AA (Anadolu Ajansı - Anadolu Agency).
高级语言: PHP
项目地址: git://github.com/bilginpro/agency-aa.git
创建时间: 2017-08-31T19:39:14Z
项目社区:https://github.com/bilginpro/agency-aa

开源协议:MIT License

下载


Anadolu Ajansi News Crawler - Anadolu Ajansı Haber Robotu

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

[EN] This package is created for crawling news from Anadolu Ajansi. You have to be subscribed to AA and obtain user credentials for being able to use this package.

[TR] Bu paket AA abonelerinin kullanıcı bilgileriyle haberleri taramaları için oluşturulmuştur. Aşağıdaki şekilde kullandığınızda son eklenen haberlerden istediğiniz adette haberi dizi olarak alabilirsiniz. Paketi kullanmak için AA abonesi olmalı ve kullanıcı bilgilerine sahip olmalısınız.

Install

Via Composer

  1. $ composer require bilginpro/agency-aa

Usage

  1. $crawler = new \BilginPro\Agency\Aa\Crawler([
  2. 'user_name' => 'your-username',
  3. 'password' => 'your-password'
  4. ]);
  5. $news = $crawler->crawl([
  6. 'limit' => 10, //optional
  7. ]);

Calling $crawler->crawl() will return an array like this:

  1. [{
  2. "code": "aa:text:20170831:12935896",
  3. "title": "Title of the news 1",
  4. "summary": "Summary...",
  5. "content": "Content 1",
  6. "created_at": "31.08.2017 15:56:12",
  7. "category": "Genel",
  8. "city": "Istanbul",
  9. "images": ["http:\/\/path\/to\/news1\/image1", "http:\/\/path\/to\/news1\/image2"]
  10. },
  11. {
  12. "code": "aa:text:20170831:12935899",
  13. "title": "Title of the news 2",
  14. "summary": "Summary...",
  15. "content": "Content 2",
  16. "created_at": "31.08.2017 15:56:12",
  17. "category": "Genel",
  18. "city": "Ankara",
  19. "images": ["http:\/\/path\/to\/news2\/image1", "http:\/\/path\/to\/news2\/image2"]
  20. }
  21. ]

Change log

Please see CHANGELOG for more information on what has changed recently.

Testing

  1. $ composer test

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email yavuz@bilgin.pro instead of using the issue tracker.

Credits

License

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