Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
T
Twint
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
Twint
Commits
48884d76
Commit
48884d76
authored
Nov 02, 2018
by
Francesco Poldi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added near attribute to ES
parent
b5c093b4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
2 deletions
+6
-2
elasticsearch/index-tweets.json
elasticsearch/index-tweets.json
+1
-0
twint/config.py
twint/config.py
+1
-0
twint/storage/elasticsearch.py
twint/storage/elasticsearch.py
+4
-2
No files found.
elasticsearch/index-tweets.json
View file @
48884d76
...
@@ -36,6 +36,7 @@ PUT twinttweets
...
@@ -36,6 +36,7 @@ PUT twinttweets
"quote_id_str"
:
{
"type"
:
"text"
},
"quote_id_str"
:
{
"type"
:
"text"
},
"quote_url"
:
{
"type"
:
"text"
},
"quote_url"
:
{
"type"
:
"text"
},
"search"
:
{
"type"
:
"text"
},
"search"
:
{
"type"
:
"text"
},
"near"
:
{
"type"
:
"text"
}
}
}
}
}
}
}
...
...
twint/config.py
View file @
48884d76
...
@@ -62,3 +62,4 @@ class Config:
...
@@ -62,3 +62,4 @@ class Config:
Query
=
None
Query
=
None
Hide_output
=
False
Hide_output
=
False
Get_replies
=
False
Get_replies
=
False
Near
=
""
twint/storage/elasticsearch.py
View file @
48884d76
...
@@ -28,7 +28,7 @@ def handleIndexResponse(response):
...
@@ -28,7 +28,7 @@ def handleIndexResponse(response):
else
:
else
:
print
(
"[x] error with shards :: storage.elasticsearch.HandleIndexCreation"
)
print
(
"[x] error with shards :: storage.elasticsearch.HandleIndexCreation"
)
return
False
return
False
def
createIndex
(
config
,
instance
,
**
scope
):
def
createIndex
(
config
,
instance
,
**
scope
):
if
scope
.
get
(
"scope"
)
==
"tweet"
:
if
scope
.
get
(
"scope"
)
==
"tweet"
:
tweets_body
=
{
tweets_body
=
{
...
@@ -68,6 +68,7 @@ def createIndex(config, instance, **scope):
...
@@ -68,6 +68,7 @@ def createIndex(config, instance, **scope):
"quote_id_str"
:
{
"type"
:
"text"
},
"quote_id_str"
:
{
"type"
:
"text"
},
"quote_url"
:
{
"type"
:
"text"
},
"quote_url"
:
{
"type"
:
"text"
},
"search"
:
{
"type"
:
"text"
},
"search"
:
{
"type"
:
"text"
},
"near"
:
{
"type"
:
"text"
}
}
}
}
}
},
},
...
@@ -211,7 +212,8 @@ def Tweet(Tweet, config):
...
@@ -211,7 +212,8 @@ def Tweet(Tweet, config):
"quote_id"
:
Tweet
.
quote_id
,
"quote_id"
:
Tweet
.
quote_id
,
"quote_id_str"
:
Tweet
.
quote_id_str
,
"quote_id_str"
:
Tweet
.
quote_id_str
,
"quote_url"
:
Tweet
.
quote_url
,
"quote_url"
:
Tweet
.
quote_url
,
"search"
:
str
(
config
.
Search
)
"search"
:
str
(
config
.
Search
),
"near"
:
config
.
Near
}
}
}
}
actions
.
append
(
j_data
)
actions
.
append
(
j_data
)
...
...
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