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
492c02fb
Commit
492c02fb
authored
Jul 15, 2019
by
Francesco Poldi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleaned up code
parent
8b9a39e2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
18 deletions
+14
-18
twint/output.py
twint/output.py
+14
-18
No files found.
twint/output.py
View file @
492c02fb
...
...
@@ -7,21 +7,19 @@ from .storage import db, elasticsearch, write, panda
import
logging
as
logme
follow_object
=
{}
follow_object
=
[]
tweets_object
=
[]
user_object
=
[]
author_list
=
{
''
}
author_list
.
pop
()
_
follow_list
=
[]
_
_follow_object
=
{}
def
clean_follow_list
():
logme
.
debug
(
__name__
+
':clean_follow_list'
)
global
_follow_list
global
follow_object
_follow_list
=
[]
follow_object
=
{}
global
__follow_object
__follow_object
=
{}
def
datecheck
(
datestamp
,
config
):
logme
.
debug
(
__name__
+
':datecheck'
)
...
...
@@ -84,12 +82,6 @@ def _output(obj, output, config, **extra):
if
config
.
Pandas
and
obj
.
__class__
.
__name__
==
"user"
:
logme
.
debug
(
__name__
+
':_output:Pandas+user'
)
panda
.
update
(
obj
,
config
)
if
extra
.
get
(
"follow_list"
):
logme
.
debug
(
__name__
+
':_output:follow_list'
)
follow_object
.
username
=
config
.
Username
follow_object
.
action
=
config
.
Following
*
"following"
+
config
.
Followers
*
"followers"
follow_object
.
users
=
_follow_list
panda
.
update
(
follow_object
,
config
.
Essid
)
if
config
.
Elasticsearch
:
logme
.
debug
(
__name__
+
':_output:Elasticsearch'
)
print
(
""
,
end
=
"."
,
flush
=
True
)
...
...
@@ -186,6 +178,7 @@ async def Users(u, config, conn):
async
def
Username
(
username
,
config
,
conn
):
logme
.
debug
(
__name__
+
':Username'
)
global
__follow_object
global
follow_object
follow_var
=
config
.
Following
*
"following"
+
config
.
Followers
*
"followers"
...
...
@@ -197,14 +190,17 @@ async def Username(username, config, conn):
logme
.
debug
(
__name__
+
':Username:Elasticsearch'
)
elasticsearch
.
Follow
(
username
,
config
)
if
config
.
Store_object
or
config
.
Pandas
:
if
config
.
Store_object
:
follow_object
.
append
(
username
)
if
config
.
Pandas
:
logme
.
debug
(
__name__
+
':Username:object+pandas'
)
try
:
_
=
follow_object
[
config
.
Username
][
follow_var
]
_
=
__
follow_object
[
config
.
Username
][
follow_var
]
except
KeyError
:
follow_object
.
update
({
config
.
Username
:
{
follow_var
:
[]}})
follow_object
[
config
.
Username
][
follow_var
]
.
append
(
username
)
__
follow_object
.
update
({
config
.
Username
:
{
follow_var
:
[]}})
__
follow_object
[
config
.
Username
][
follow_var
]
.
append
(
username
)
if
config
.
Pandas_au
:
logme
.
debug
(
__name__
+
':Username:object+pandas+au'
)
panda
.
update
(
follow_object
[
config
.
Username
],
config
)
_output
(
username
,
username
,
config
,
follow_list
=
_follow_list
)
panda
.
update
(
__
follow_object
[
config
.
Username
],
config
)
_output
(
username
,
username
,
config
)
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