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
9bfd9f56
Commit
9bfd9f56
authored
Apr 12, 2018
by
Cody Zacharias
Committed by
GitHub
Apr 12, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Month Scrape Limit bug
parent
5c4e897e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
17 deletions
+25
-17
twint.py
twint.py
+25
-17
No files found.
twint.py
View file @
9bfd9f56
...
...
@@ -639,30 +639,38 @@ async def main():
init
=
-
1
num
=
0
action
=
getAction
()
while
_since
<
_until
:
arg
.
since
=
str
(
_until
-
datetime
.
timedelta
(
days
=
int
(
arg
.
timedelta
)))
arg
.
until
=
str
(
_until
)
'''
If our response from getFeed() has an exception,
it signifies there are no position IDs to continue
with, telling Twint it's finished scraping.
'''
if
len
(
feed
)
>
0
:
if
action
!=
""
:
if
action
!=
""
:
while
True
:
if
len
(
feed
)
>
0
:
if
arg
.
favorites
:
feed
,
init
,
count
=
await
getFavorites
(
init
)
num
+=
count
else
:
feed
,
init
=
await
getFollow
(
init
)
else
:
break
if
arg
.
limit
is
not
None
and
num
>=
int
(
arg
.
limit
):
break
else
:
while
_since
<
_until
:
arg
.
since
=
str
(
_until
-
datetime
.
timedelta
(
days
=
int
(
arg
.
timedelta
)))
arg
.
until
=
str
(
_until
)
'''
If our response from getFeed() has an exception,
it signifies there are no position IDs to continue
with, telling Twint it's finished scraping.
'''
if
len
(
feed
)
>
0
:
feed
,
init
,
count
=
await
getTweets
(
init
)
num
+=
count
else
:
_until
=
_until
-
datetime
.
timedelta
(
days
=
int
(
arg
.
timedelta
))
feed
=
[
-
1
]
break
# Control when we want to stop scraping.
if
arg
.
limit
is
not
None
and
num
>=
int
(
arg
.
limit
):
break
else
:
_until
=
_until
-
datetime
.
timedelta
(
days
=
int
(
arg
.
timedelta
))
feed
=
[
-
1
]
# Control when we want to stop scraping.
if
arg
.
limit
is
not
None
and
num
>=
int
(
arg
.
limit
):
break
if
arg
.
database
:
now
=
str
(
datetime
.
datetime
.
now
())
...
...
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