Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
crawler.vmusicchart.vn
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Phạm Văn Đoan
crawler.vmusicchart.vn
Commits
750bd510
Commit
750bd510
authored
Jul 06, 2020
by
Phạm Văn Đoan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cập nhật lấy bài hát ở keeng
parent
2f205883
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
KeengCrawlerNewRealeaseCommand.php
...Console/Commands/Keeng/KeengCrawlerNewRealeaseCommand.php
+7
-2
Kernel.php
app/Console/Kernel.php
+3
-0
No files found.
app/Console/Commands/Keeng/KeengCrawlerNewRealeaseCommand.php
View file @
750bd510
...
@@ -57,12 +57,17 @@ class KeengCrawlerNewRealeaseCommand extends Command
...
@@ -57,12 +57,17 @@ class KeengCrawlerNewRealeaseCommand extends Command
$domain
=
config
(
'api.keeng.domain'
);
$domain
=
config
(
'api.keeng.domain'
);
$tracks
=
[];
$tracks
=
[];
$index
=
0
;
$index
=
0
;
for
(
$i
=
1
;
$i
<=
1
0
;
$i
++
)
{
for
(
$i
=
1
;
$i
<=
1
;
$i
++
)
{
$url
=
getKeengUrlNewRealease
(
$i
);
$url
=
getKeengUrlNewRealease
(
$i
);
$curl
=
cURL
(
$url
);
$curl
=
cURL
(
$url
);
$data
=
json_decode
(
$curl
);
$data
=
json_decode
(
$curl
);
if
(
isset
(
$data
->
data
))
{
if
(
isset
(
$data
->
data
))
{
foreach
(
$data
->
data
as
$key
=>
$track
)
{
foreach
(
$data
->
data
as
$key
=>
$track
)
{
$id_keeng
=
(
isset
(
$track
->
identify
)
&&
$track
->
identify
!=
''
)
?
$track
->
identify
:
null
;
if
(
empty
(
$id_keeng
))
{
$id_keeng
=
(
isset
(
$track
->
info_extra
->
identify
))
?
$track
->
info_extra
->
identify
:
null
;
}
//
$tracks
[
$index
][
'title'
]
=
isset
(
$track
->
name
)
?
$track
->
name
:
'unknown-title'
;
$tracks
[
$index
][
'title'
]
=
isset
(
$track
->
name
)
?
$track
->
name
:
'unknown-title'
;
$tracks
[
$index
][
'slug'
]
=
isset
(
$track
->
slug
)
?
$track
->
slug
:
null
;
$tracks
[
$index
][
'slug'
]
=
isset
(
$track
->
slug
)
?
$track
->
slug
:
null
;
$tracks
[
$index
][
'userid'
]
=
0
;
$tracks
[
$index
][
'userid'
]
=
0
;
...
@@ -71,7 +76,7 @@ class KeengCrawlerNewRealeaseCommand extends Command
...
@@ -71,7 +76,7 @@ class KeengCrawlerNewRealeaseCommand extends Command
$tracks
[
$index
][
'download_hash'
]
=
md5
(
$track
->
id
);
$tracks
[
$index
][
'download_hash'
]
=
md5
(
$track
->
id
);
$tracks
[
$index
][
'time'
]
=
time
();
$tracks
[
$index
][
'time'
]
=
time
();
$tracks
[
$index
][
'link_keeng'
]
=
isset
(
$track
->
url
)
?
$track
->
url
:
null
;
$tracks
[
$index
][
'link_keeng'
]
=
isset
(
$track
->
url
)
?
$track
->
url
:
null
;
$tracks
[
$index
][
'id_keeng'
]
=
isset
(
$track
->
identify
)
?
$track
->
identify
:
null
;
$tracks
[
$index
][
'id_keeng'
]
=
$id_keeng
;
$tracks
[
$index
][
'singer_list'
]
=
isset
(
$track
->
singer
)
?
$track
->
singer
:
null
;
$tracks
[
$index
][
'singer_list'
]
=
isset
(
$track
->
singer
)
?
$track
->
singer
:
null
;
$tracks
[
$index
][
'composer_list'
]
=
isset
(
$track
->
info_extra
->
author_name
)
?
$track
->
info_extra
->
author_name
:
null
;
$tracks
[
$index
][
'composer_list'
]
=
isset
(
$track
->
info_extra
->
author_name
)
?
$track
->
info_extra
->
author_name
:
null
;
$tracks
[
$index
][
'src_thumbnail'
]
=
isset
(
$track
->
image
)
?
$track
->
image
:
null
;
$tracks
[
$index
][
'src_thumbnail'
]
=
isset
(
$track
->
image
)
?
$track
->
image
:
null
;
...
...
app/Console/Kernel.php
View file @
750bd510
...
@@ -68,6 +68,9 @@ class Kernel extends ConsoleKernel
...
@@ -68,6 +68,9 @@ class Kernel extends ConsoleKernel
$schedule
->
command
(
'nct:get-track'
)
->
dailyAt
(
'13:10'
);
$schedule
->
command
(
'nct:get-track'
)
->
dailyAt
(
'13:10'
);
//$schedule->command('nhacvn:get-track')->dailyAt('13:20');
//$schedule->command('nhacvn:get-track')->dailyAt('13:20');
$schedule
->
command
(
'keeng:get-track'
)
->
dailyAt
(
'13:30'
);
$schedule
->
command
(
'keeng:get-track'
)
->
dailyAt
(
'13:30'
);
$schedule
->
command
(
'keeng:get-new-release-track'
)
->
dailyAt
(
'13:35'
);
// Cập nhật ảnh bài hát
$schedule
->
command
(
'crawler:get-track-image'
)
->
dailyAt
(
'13:40'
);
$schedule
->
command
(
'crawler:get-track-image'
)
->
dailyAt
(
'13:40'
);
// Cập nhật thông tin ca sĩ, nhạc sĩ sau 21h
// Cập nhật thông tin ca sĩ, nhạc sĩ sau 21h
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment