twitrssme icon indicating copy to clipboard operation
twitrssme copied to clipboard

Allow exact strings in the live search

Open acrostich opened this issue 7 years ago • 3 comments

Quoting a string to do an exact search is not currently supported, this would be really useful.

Currently https://www.twitrss.me/twitter_search_to_rss/?term=a+b will search for any tweet with 'a' and 'b' in it.

https://www.twitrss.me/twitter_search_to_rss/?term="a+b" is not generating any feed, but ideally would generate a feed of tweets containing the string "a b".

This works on Twitter without be logged in so can be scraped.

I tried with both " and %22 to no avail.

acrostich avatar Apr 04 '18 19:04 acrostich

I've found that &vertical=default&src=spxr does what I want in a search:

Rare word:

https://twitter.com/search?f=tweets&vertical=default&q=glindahl&src=spxr

And here's an exact A+B:

https://twitter.com/search?f=tweets&vertical=default&q=glindahl+blekko&src=spxr

Reading the code, src can be set cosmetically:

https://twitrss.me/twitter_search_to_rss/?term=glindahl&src=spxr

but that doesn't affect the actual search. Adding a src parameter to fetch_search_feed() does the trick!

wumpus avatar Sep 16 '18 02:09 wumpus

Interesting, but it doesn't solve my issue which is searching for an exact string.

Using your example of the search for an exact A+B, brings results of the form "A B", when I'm looking only for results of the form "AB".

BTW, is "spxr" documented anywhere? And are there any other useful src arguments? A search for it didn't bring any good result, with "typd" explained as for what is typed and hence should be corrected and "sprv" as the alternative without mention of "sxpr", e.g., https://stackoverflow.com/questions/32820680/twitter-search-api-parameters

In any case it would make more sense for twittrssme to use a src other than typd, whether that should be sprv or sxpr.

acrostich avatar Sep 16 '18 11:09 acrostich

I discovered spxr by typing into Twitter's advanced search, a couple of years ago.

wumpus avatar Sep 16 '18 17:09 wumpus