pauldotknopf / twitter-dump Goto Github PK
View Code? Open in Web Editor NEWDump data from Twitter's public API.
Dump data from Twitter's public API.
Hi, would it be possible for you to include a (boolean?) attribute that stores if a tweet has media attached to it? It would be even better if the attribute was a direct link to the media.
Thanks!
I used this to install dotnet
:
sudo snap install --classic dotnet-sdk
:
SDK Version: 5.0.302
:
Installation dotnet tool install --global TwitterDump
worked.
But running your example gives:
$ twitter-dump search -q "(from:realDonaldTrump)" -o trump.json
A fatal error occurred. The required library libhostfxr.so could not be found.
If this is a self-contained application, that library should exist in [/home/tange/.dotnet/tools/.store/twitterdump/0.4.0/twitterdump/0.4.0/tools/netcoreapp3.1/any/].
If this is a framework-dependent application, install the runtime in the global location [/usr/share/dotnet] or use the DOTNET_ROOT environment variable to specify the runtime location or register the runtime location in [/etc/dotnet/install_location].
The .NET runtime can be found at:
- https://aka.ms/dotnet-core-applaunch?missing_runtime=true&arch=x64&rid=ubuntu.20.04-x64&apphost_version=5.0.8
OS: Ubuntu 20.04
dotnet --version: 5.0.302
I try running build.sh
. It fails:
$ bash build.sh
/home/tange/tmp/twitter-dump/build/scripts/Build.csproj(3,3): error MSB4019: The imported project "/home/tange/tmp/twitter-dump/build/scripts/Buildary/Build.proj" was not found. Confirm that the expression in the Import declaration "Buildary/Build.proj" is correct, and that the file exists on disk.
The build failed. Fix the build errors and run again.
Did you forget to add build/scripts/Buildary/Build.proj
to git?
Hello, I have used your tool which is awesome, thank you. I'm French with a windows in french, So the cast of the date of the tweet throw an error. It's just needed to add "Culture = System.Globalization.CultureInfo.InvariantCulture" to the dateTimeConverter.
twitter-dump/src/TwitterDump/Twitter.cs
Line 127 in b690b3f
i can't find adaptive.json in the Network capture.. but i manage to use guide.json instead though.
On Twitter, a search for from:jordancurve filter:nativeretweets
shows retweets by me. However, that search returns 0 results with twitter-dump (though from:jordancurve
works fine).
Would it be possible to add a wait timer when rate limit is reached, This issue is popping up only recently since twitters new mangement
What does this really mean:
-o, --output Required. (Default: stdout)
I think it would make sense to make -o
optional and default to stdout.
I get this error whenever I try to run the program:
16:55:14 WRN] Request exception BadRequest {"errors":[{"message":"Bad Authentication data","code":215}]}
Clearly it's working but something's wrong with how it's authenticating. Can I provide the key a different way?
Thanks for this app! It generally worked well in small tests on my Mac and a Windows machine.
I got into a few "TooManyRequests" error with the error code 88. At that point tweet collection just stopped and no json file was created/saved. Is there any way to save the tweets already collected?
What dependencies do I need to install? I have dotnet installed on my machine but get "command not found: dotnet" when I try to install this. Do I have to clone your repo?
What is the syntax for '-q'?
Is is documented in some Twitter API?
After running for some time, I always get this error.
Unhandled exception. System.Net.Http.HttpRequestException: Error while copying content to a stream.
---> System.IO.IOException: Received an unexpected EOF or 0 bytes from the transport stream.
at System.Net.Security.SslStream.ReadAsyncInternal[TReadAdapter](TReadAdapter adapter, Memory1 buffer) at System.Net.Http.HttpConnection.FillAsync() at System.Net.Http.HttpConnection.CopyToContentLengthAsync(Stream destination, UInt64 length, Int32 bufferSize, CancellationToken cancellationToken) at System.Net.Http.HttpConnection.ContentLengthReadStream.CompleteCopyToAsync(Task copyTask, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionResponseContent.SerializeToStreamAsync(Stream stream, TransportContext context, CancellationToken cancellationToken) at System.Net.Http.HttpContent.LoadIntoBufferAsyncCore(Task serializeToStreamTask, MemoryStream tempBuffer) --- End of inner exception stack trace --- at System.Net.Http.HttpContent.LoadIntoBufferAsyncCore(Task serializeToStreamTask, MemoryStream tempBuffer) at System.Net.Http.HttpClient.FinishSendAsyncBuffered(Task
1 sendTask, HttpRequestMessage request, CancellationTokenSource cts, Boolean disposeCts)
at TwitterDump.Twitter.g__MakeRequest|2_0(<>c__DisplayClass2_0& ) in /home/pknopf/git/twitter-dump/src/TwitterDump/Twitter.cs:line 205
at TwitterDump.Twitter.RetryGet(HttpClient client, String url) in /home/pknopf/git/twitter-dump/src/TwitterDump/Twitter.cs:line 233
at TwitterDump.Twitter.GetTweets(String url, Dictionary2 headers, String& nextCursor) in /home/pknopf/git/twitter-dump/src/TwitterDump/Twitter.cs:line 120 at TwitterDump.Twitter.SearchTweets(String query, Dictionary
2 headers, Nullable1 pageSize, Nullable
1 maxResults) in /home/pknopf/git/twitter-dump/src/TwitterDump/Twitter.cs:line 71
at TwitterDump.Program.Search(SearchOptions options) in /home/pknopf/git/twitter-dump/src/TwitterDump/Program.cs:line 65
at TwitterDump.Program.<>c.
1 result, Func
2 parsedFunc1, Func2 parsedFunc2, Func
2 notParsedFunc)# ./twitter-dump search -q "geocode:52.5186202,13.3761872,0.2km" -o test.json
[20:02:47 INF] Requesting https://api.twitter.com/2/search/adaptive.json?include_profile_interstitial_type=1&include_blocking=1&include_blocked_by=1&include_followed_by=1&include_want_retweets=1&include_mute_edge=1&include_can_dm=1&include_can_media_tag=1&skip_status=1&cards_platform=Web-12&include_cards=1&include_composer_source=true&include_ext_alt_text=true&include_reply_count=1&tweet_mode=extended&include_entities=true&include_user_entities=true&include_ext_media_color=true&include_ext_media_availability=true&send_error_codes=true&simple_quoted_tweets=true&tweet_search_mode=live&count=100&query_source=typed_query&pc=1&spelling_corrections=1&ext=mediaStats,highlightedLabel,cameraMoment&q=geocode%3A52.5186202,13.3761872,0.2km..
Unhandled exception. Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: A. Path '', line 1, position 1.
at Newtonsoft.Json.JsonTextReader.ParseValue()
at Newtonsoft.Json.JsonWriter.WriteToken(JsonReader reader, Boolean writeChildren, Boolean writeDateConstructorAsDate, Boolean writeComments)
at Newtonsoft.Json.Linq.JTokenWriter.WriteToken(JsonReader reader, Boolean writeChildren, Boolean writeDateConstructorAsDate, Boolean writeComments)
at Newtonsoft.Json.JsonWriter.WriteToken(JsonReader reader, Boolean writeChildren)
at Newtonsoft.Json.JsonWriter.WriteToken(JsonReader reader)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateJToken(JsonReader reader, JsonContract contract)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateList(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, Object existingValue, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objec
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.