Remove some fields from config as we don't use them anymore + add genre field

This commit is contained in:
Gabriel Augendre 2018-11-20 14:31:38 +01:00
parent 27214bb1e0
commit 9958d50aa9
11 changed files with 27 additions and 18 deletions

View file

@ -4,8 +4,6 @@
youtubebeat: youtubebeat:
# Defines how often an event is sent to the output # Defines how often an event is sent to the output
period: 1s
start_id: "SmBCZgcGlKk"
parallelism: 5 parallelism: 5
max_depth: 10 max_depth: 10

View file

@ -12,6 +12,11 @@
required: true required: true
description: > description: >
Video title Video title
- name: genre
type: text
required: true
description: >
Video title
- name: views - name: views
type: long type: long
required: true required: true

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -81,7 +81,6 @@ func scrapeVideos(b *beat.Beat, bt *Youtubebeat, done chan bool) {
id := strings.Replace(fields["url"].(string), BaseUrl+BaseSuffix, "", -1) id := strings.Replace(fields["url"].(string), BaseUrl+BaseSuffix, "", -1)
event.SetID(id) event.SetID(id)
logp.Info(fields.String())
bt.client.Publish(event) bt.client.Publish(event)
logp.Info("Event sent") logp.Info("Event sent")
}) })

View file

@ -3,18 +3,12 @@
package config package config
import "time"
type Config struct { type Config struct {
Period time.Duration `config:"period"`
StartId string `config:"start_id"`
Parallelism int `config:"parallelism"` Parallelism int `config:"parallelism"`
MaxDepth int `config:"max_depth"` MaxDepth int `config:"max_depth"`
} }
var DefaultConfig = Config{ var DefaultConfig = Config{
Period: 1 * time.Second,
StartId: "SmBCZgcGlKk",
Parallelism: 5, Parallelism: 5,
MaxDepth: 10, MaxDepth: 10,
} }

View file

@ -453,6 +453,18 @@ required: True
Video title Video title
--
*`genre`*::
+
--
type: text
required: True
Video title
-- --
*`views`*:: *`views`*::

View file

@ -12,6 +12,11 @@
required: true required: true
description: > description: >
Video title Video title
- name: genre
type: text
required: true
description: >
Video title
- name: views - name: views
type: long type: long
required: true required: true

View file

@ -31,5 +31,5 @@ func init() {
// Asset returns asset data // Asset returns asset data
func Asset() string { func Asset() string {
return "eJy0WFtv2zYUfu+vOOj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chsdAz6ihyo1ST+fN0H/QmYn7ab48/U7epM+K8W2cyel1gpgwObO8kA658/YMexjAwf8xyzN4+PF6df3DApgtF1BVfAGlrOi7sRRDWaWYC0/605T8+Rc0QEkDR+0MLcCvvXZ+AVuphdnuETH84vl6DQlnkmPDSql2J1PUMGmTFkXB3AIEriXTC9hYxDWJud3KaiRh0DXD/laSCwnt9v0FE8IiEdKYoGT8tE02NAWzYsssdmQL8OSZUjt49+qmr6HJI3d+jVajQ+qyye/9vgnabrx9Bg/ftB0o9HPJfFnsFh1MQAPR8KQ0VBlxhvLQO4HKiDq3TVL5U1NTj+m9EfDp9vWYKPylivHzbapDHJOFL7CznmBA3HOExxbX44hqNChZNWZiWhsX//91Nroe5DTnOR8sPV4+eLvM0Z7hyTbJW+P+FwAA//+CrAtt"
} }

View file

@ -4,8 +4,6 @@
youtubebeat: youtubebeat:
# Defines how often an event is sent to the output # Defines how often an event is sent to the output
period: 1s
start_id: "SmBCZgcGlKk"
parallelism: 5 parallelism: 5
max_depth: 10 max_depth: 10

View file

@ -4,8 +4,6 @@
youtubebeat: youtubebeat:
# Defines how often an event is sent to the output # Defines how often an event is sent to the output
period: 1s
start_id: "SmBCZgcGlKk"
parallelism: 5 parallelism: 5
max_depth: 10 max_depth: 10