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
58eff295
Commit
58eff295
authored
Oct 25, 2018
by
andytnt
Committed by
Francesco Poldi
Oct 25, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix json (#259)
* Fix json * Added new data to meta
parent
d0fb0292
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
13 deletions
+47
-13
twint/storage/write_meta.py
twint/storage/write_meta.py
+47
-13
No files found.
twint/storage/write_meta.py
View file @
58eff295
def
tweetData
(
t
):
def
tweetData
(
t
):
data
=
{
data
=
{
"id"
:
int
(
t
.
id
),
"id"
:
int
(
t
.
id
),
"conversation_id"
:
t
.
conversation_id
,
"created_at"
:
t
.
datetime
,
"date"
:
t
.
datestamp
,
"date"
:
t
.
datestamp
,
"time"
:
t
.
timestamp
,
"time"
:
t
.
timestamp
,
"timezone"
:
t
.
timezone
,
"timezone"
:
t
.
timezone
,
"user_id"
:
int
(
t
.
user_id
)
,
"user_id"
:
t
.
user_id
,
"username"
:
t
.
username
,
"username"
:
t
.
username
,
"name"
:
t
.
name
,
"place"
:
t
.
place
,
"tweet"
:
t
.
tweet
,
"tweet"
:
t
.
tweet
,
"replies"
:
int
(
t
.
replies
),
"tags"
:
t
.
tags
,
"retweets"
:
int
(
t
.
retweets
),
"replies"
:
t
.
replies
,
"likes"
:
int
(
t
.
likes
),
"mentions"
:
t
.
mentions
,
"urls"
:
t
.
urls
,
"photos"
:
t
.
photos
,
"replies_count"
:
int
(
t
.
replies_count
),
"retweets_count"
:
int
(
t
.
retweets_count
),
"likes_count"
:
int
(
t
.
likes_count
),
"location"
:
t
.
location
,
"location"
:
t
.
location
,
"hashtags"
:
","
.
join
(
t
.
hashtags
)
,
"hashtags"
:
t
.
hashtags
,
"link"
:
t
.
link
,
"link"
:
t
.
link
,
"retweet"
:
t
.
retweet
,
"retweet"
:
t
.
retweet
,
"user_rt"
:
t
.
user_rt
,
"gif_url"
:
t
.
gif_url
,
"mentions"
:
","
.
join
(
t
.
mentions
)
"gif_thumb"
:
t
.
gif_thumb
,
"video_url"
:
t
.
video_url
,
"video_thumb"
:
t
.
video_thumb
,
"is_quote_status"
:
t
.
is_quote_status
,
"quote_id"
:
t
.
quote_id
,
"quote_url"
:
t
.
quote_url
,
"is_reply_to"
:
t
.
is_reply_to
,
"has_parent_tweet"
:
t
.
has_parent_tweet
}
}
return
data
return
data
def
tweetFieldnames
():
def
tweetFieldnames
():
fieldnames
=
[
fieldnames
=
[
"id"
,
"id"
,
"conversation_id"
,
"created_at"
,
"date"
,
"date"
,
"time"
,
"time"
,
"timezone"
,
"timezone"
,
"user_id"
,
"user_id"
,
"username"
,
"username"
,
"name"
,
"place"
,
"tweet"
,
"tweet"
,
"tags"
,
"replies"
,
"replies"
,
"retweets"
,
"mentions"
,
"likes"
,
"urls"
,
"photos"
,
"replies_count"
,
"retweets_count"
,
"likes_count"
,
"location"
,
"location"
,
"hashtags"
,
"hashtags"
,
"link"
,
"link"
,
"retweet"
,
"retweet"
,
"user_rt"
,
"gif_url"
,
"mentions"
"gif_thumb"
,
"video_url"
,
"video_thumb"
,
"is_quote_status"
,
"quote_id"
,
"quote_url"
,
"is_reply_to"
,
"has_parent_tweet"
]
]
return
fieldnames
return
fieldnames
...
@@ -57,7 +89,8 @@ def userData(u):
...
@@ -57,7 +89,8 @@ def userData(u):
"media"
:
int
(
u
.
media_count
),
"media"
:
int
(
u
.
media_count
),
"private"
:
u
.
is_private
,
"private"
:
u
.
is_private
,
"verified"
:
u
.
is_verified
,
"verified"
:
u
.
is_verified
,
"avatar"
:
u
.
avatar
"avatar"
:
u
.
avatar
,
"background_image"
:
u
.
background_image
}
}
return
data
return
data
...
@@ -78,7 +111,8 @@ def userFieldnames():
...
@@ -78,7 +111,8 @@ def userFieldnames():
"media"
,
"media"
,
"private"
,
"private"
,
"verified"
,
"verified"
,
"avatar"
"avatar"
,
"background_image"
]
]
return
fieldnames
return
fieldnames
...
...
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