twitterscraper-ruby 0.15.1 → 0.15.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/twitterscraper.rb +1 -0
- data/lib/twitterscraper/query.rb +3 -2
- data/lib/twitterscraper/type.rb +15 -0
- data/lib/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7f7d320841125d9a582ece6083f421f0abf301addbc5c5c2a3d2b2c09bedbc33
|
4
|
+
data.tar.gz: 6ea43165ffa4f37c4319566689a42f2f275d8a70402b0d6b4164df519fee90b5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ee3756538ec28e9f0113e611e2731ec33107dabacf7cb730b257d6c94351407ef171a9bc91402a589fa73fdb6b705f73b11582766af1d04a3413b8bc79dc6619
|
7
|
+
data.tar.gz: 78200dc658a9c1cf43ed7367e499b0d1b243728aecb2ffd7366b5612f8905bb33d27ab7e1412327d05b7fff159196fe9e24d18c8cc4c24898af10533fbdf43df
|
data/Gemfile.lock
CHANGED
data/lib/twitterscraper.rb
CHANGED
data/lib/twitterscraper/query.rb
CHANGED
@@ -28,7 +28,7 @@ module Twitterscraper
|
|
28
28
|
'max_position=__POS__&reset_error_state=false'
|
29
29
|
|
30
30
|
def build_query_url(query, lang, type, pos)
|
31
|
-
if type
|
31
|
+
if type.user?
|
32
32
|
if pos
|
33
33
|
RELOAD_URL_USER.sub('__USER__', query).sub('__POS__', pos.to_s)
|
34
34
|
else
|
@@ -108,7 +108,7 @@ module Twitterscraper
|
|
108
108
|
|
109
109
|
if json_resp
|
110
110
|
[tweets, json_resp['min_position']]
|
111
|
-
elsif type
|
111
|
+
elsif type.user?
|
112
112
|
[tweets, tweets[-1].tweet_id]
|
113
113
|
else
|
114
114
|
[tweets, "TWEET-#{tweets[-1].tweet_id}-#{tweets[0].tweet_id}"]
|
@@ -200,6 +200,7 @@ module Twitterscraper
|
|
200
200
|
start_date = Date.parse(start_date) if start_date && start_date.is_a?(String)
|
201
201
|
end_date = Date.parse(end_date) if end_date && end_date.is_a?(String)
|
202
202
|
queries = build_queries(query, start_date, end_date)
|
203
|
+
type = Type.new(type)
|
203
204
|
if threads > queries.size
|
204
205
|
logger.warn 'The maximum number of :threads is the number of dates between :start_date and :end_date.'
|
205
206
|
threads = queries.size
|
data/lib/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: twitterscraper-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.15.
|
4
|
+
version: 0.15.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ts-3156
|
@@ -73,6 +73,7 @@ files:
|
|
73
73
|
- lib/twitterscraper/query.rb
|
74
74
|
- lib/twitterscraper/template.rb
|
75
75
|
- lib/twitterscraper/tweet.rb
|
76
|
+
- lib/twitterscraper/type.rb
|
76
77
|
- lib/version.rb
|
77
78
|
- twitterscraper-ruby.gemspec
|
78
79
|
homepage: https://github.com/ts-3156/twitterscraper-ruby
|