Skip to content

Commit

Permalink
Merge pull request #33 from tell-k/added_bing_preview
Browse files Browse the repository at this point in the history
Support BingPreview
  • Loading branch information
yuya-takeyama authored Aug 21, 2016
2 parents 266dec9 + e886776 commit 628d1c8
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/AgentCategory/Crawler/Crawlers.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ public static function challenge($ua, &$result)

return true;
}
} elseif (strpos($ua, 'BingPreview') !== false) {
static::updateMap($result, DataSet::get('BingPreview'));

return true;
} elseif (strpos($ua, 'Baidu') !== false) {
if (strpos($ua, 'compatible; Baiduspider') !== false || strpos($ua, 'Baiduspider+') !== false || strpos($ua, 'Baiduspider-image+') !== false) {
static::updateMap($result, DataSet::get('Baiduspider'));
Expand Down
8 changes: 7 additions & 1 deletion src/DataSet.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
namespace Woothee;

// GENERATED from dataset.yml at Tue May 17 02:10:37 JST 2016 by yuya
// GENERATED from dataset.yml at Sun Aug 21 20:17:52 JST 2016 by tell_k
class DataSet
{
const DATASET_KEY_LABEL = 'label';
Expand Down Expand Up @@ -520,6 +520,12 @@ class DataSet
'type' => 'full',
'category' => 'crawler',
),
'BingPreview' => array(
'label' => 'BingPreview',
'name' => 'BingPreview',
'type' => 'full',
'category' => 'crawler',
),
'Yeti' => array(
'label' => 'Yeti',
'name' => 'Naver Yeti',
Expand Down
2 changes: 1 addition & 1 deletion woothee

0 comments on commit 628d1c8

Please sign in to comment.