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
1de60f64
Commit
1de60f64
authored
Apr 07, 2018
by
4sakura
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
implement issue #53 language selection
and add table with country code
parent
f47d011e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
69 additions
and
0 deletions
+69
-0
README.md
README.md
+66
-0
tweep.py
tweep.py
+3
-0
No files found.
README.md
View file @
1de60f64
...
...
@@ -65,6 +65,72 @@ A few simple examples to help you understand the basics:
## Example String
`955511208597184512 2018-01-22 18:43:19 GMT <now> pineapples are the best fruit`
## Language code
**maybe this shold get a Wikipage?**
|Language|code|
|---|:---:|
|arabic|ar|
|amharic|am|
|armenian|hy|
|bangla|bn|
|bulgarian|bg|
|burmese|my|
|central kurdish|ckb|
|chinese|zh|
|danish|da|
|divehi|dv|
|dutch|nl|
|english|en|
|estonian|et|
|finnish|fi|
|french|fr|
|georgian|ka|
|german|de|
|greek|el|
|gujarati|gu|
|haitian creol|ht|
|hebrew|he|
|hindi|hi|
|hungarian|hu|
|icelandic|is|
|indonesian|id|
|italian|it|
|japanese|ja|
|kannada|kn|
|khmer|km|
|korean|ko|
|lao|lo|
|latvian|lv|
|lithuanian|lt|
|malayalam|ml|
|marathi|mr|
|nepali|ne|
|norwegian|no|
|odia|or|
|pashto|ps|
|persian|fa|
|polish|pl|
|portugese|pt|
|punjabi|pa|
|romanian|ro|
|russian|ru|
|spanish|es|
|serbian|sr|
|sindhi|sd|
|sinhala|si|
|slovenian|sl|
|swedish|sv|
|tagalog|tl|
|tamil|ta|
|telugu|te|
|thai|th|
|tibetian|bo|
|turkish|tr|
|urdu|ur|
|uyghur|ug|
|vietnamese|vi|
## Screenshot
<img
src=
"https://i.imgur.com/RKdBrHr.png"
/>
...
...
tweep.py
View file @
1de60f64
...
...
@@ -79,6 +79,8 @@ async def getUrl(init):
url
+=
"&lang=en&include_available_features=1&include_entities=1&reset_"
url
+=
"error_state=false&src=typd&max_position={}&q="
.
format
(
init
)
if
arg
.
l
!=
None
:
url
=
url
.
replace
(
"lang=en"
,
"l={0.l}&lang=en"
.
format
(
arg
))
if
arg
.
u
!=
None
:
url
+=
"from
%3
A{0.u}"
.
format
(
arg
)
if
arg
.
g
!=
None
:
...
...
@@ -460,6 +462,7 @@ if __name__ == "__main__":
ap
.
add_argument
(
"-u"
,
help
=
"User's Tweets you want to scrape."
)
ap
.
add_argument
(
"-s"
,
help
=
"Search for Tweets containing this word or phrase."
)
ap
.
add_argument
(
"-g"
,
help
=
"Search for geocoded tweets."
)
ap
.
add_argument
(
"-l"
,
help
=
"Serch for Tweets in a specific language"
)
ap
.
add_argument
(
"-o"
,
help
=
"Save output to a file."
)
ap
.
add_argument
(
"-es"
,
"--elasticsearch"
,
help
=
"Index to Elasticsearch"
)
ap
.
add_argument
(
"--year"
,
help
=
"Filter Tweets before specified year."
)
...
...
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