-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
a new way to make searches #917
base: master
Are you sure you want to change the base?
a new way to make searches #917
Conversation
changed endpoint, updated parser to the new page after the search you can get tweets from "c.search_tweet_list" as a list
I've edited the files as shown in your changes. |
Hi Thank you for the quick changes. I have unistalledand reinstalled Twint using both the 'clone github' approach and a simple pip Install Twint but I am still not able to get Tweets using the code in the example above. All was fine until yesterday. I am relatively new to Twint and Git, but how do I make sure the 'fixed' code is installed on my machine - is it available to install with pip? Thank you! |
I've installed your commit using |
@Vickycats @essentialols
to fetch and checkout to branch while cloning. @Bobpick cli will not print output with this but you can easily follow the method above. |
I'm still getting the same error. |
let's run a "git log" and be sure you're running the right code @Bobpick |
I made the changes but how do I use it? |
@Bobpick you'd say It works for me now. I installed it using Thanks so much yunusemrecatalcam. |
@boshez create a python file on the twint main directory and try that code import twint
c = twint.Config()
c.Search = "yey"
c.Store_object = True
c.Limit = 100
twint.run.Search(c)
tlist = c.search_tweet_list |
@yunusemrecatalcam how did you manage to run it? I am a bit confused. |
I did but it gave me an idented error on line 62. |
It works for me, thanks for the help! Is it possible to get more information about the tweets like before when running |
I ran this: and I'm running it, it seems to have suppressed the sleeping notifications and nothing is happening. I'll let it time out and let you know. How do I do a git log? |
How did you run it? I am struggling. |
I'm struggling to. This is the result of running it: During handling of the above exception, another exception occurred: Traceback (most recent call last): |
I installed it that way and the example in the original post at the top of this thread works for me. |
I am facing identation errors when I run the script. |
Go to a good script and look how many spaces there are, and work from that. |
I run
Threw:
|
|
I was able to get it working on Python 3.7.6 using the following:
Was able to search for specific username like so:
Some things I've noticed so far...
But, regardless... this is a big improvement over having NOTHING to work with! |
I hope the developers find a solution to this. I don't know what I am going to do. |
I am finding that it will not output to a file using c.Output (but one can dump the list output to a csv of course at the end instead), and it will not make use of c.Hide_output=False so as to display results on screen as it goes (it just ignores both parameters). For me it will accept c.Search="(from:username)" to find tweets from that person and c.Search="@username" to locate mentions/replies. For me it will accept c.Search="(from:username) max_id:tweet number" as well if one is attempting to use a date range but I have not tested that it is returning correctly using the max_id number (ie it returns tweets and does not freeze). It also does not freeze if one uses c.Since but again I have not checked whether Since is working as it should. It sometimes returns error "shit: 7s list index out of range" which might be relevant? |
In what context are you doing the c.Search, is this in a python file? |
Thanks, @Bobpick |
|
Yes, Its part of a complex program but the relevant part of my test code which seems to work is: c=twint.Config() srchname="(from:RealDonaldTrump)" twint.run.Search(c) |
? |
This comment has been minimized.
This comment has been minimized.
With what script did I achieve that?
…________________________________
De: arceuss <[email protected]>
Enviado: miércoles, 30 de septiembre de 2020 0:03
Para: twintproject/twint <[email protected]>
Cc: dansar39 <[email protected]>; Mention <[email protected]>
Asunto: Re: [twintproject/twint] a new way to make searches (#917)
?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#917 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/APYWXU6POH4U7SPUODZXNZDSIJYVPANCNFSM4RR7YMPQ>.
|
Locking this conversation because it's becoming too much off-topic, in the last few comments about another repo are mentioned and issues about it are being reported. I may decide to re-open this in a few days and hide (not deleting) comments not related to twint |
@Lulua-Ali i found a temp solution change this line to tweet_dict['tweet'] = tweet.find("div", {"class": "tweet-text"}).find("div", {"class": "dir-rtl"}).text but it will stop the English search |
Changed url for search, updated parser to the new page.
After the search you can get tweets from "c.search_tweet_list" as a list
timestamps, fav-rt counts does not return with this page but it is the best option for now
example
@pielco11