Open SimonFrings opened 2 years ago
The query is double encoded by accident by rss-bridge. But twitter seems to correct that error in their backend. There's something else here. Maybe the hypen (-
) in the query is interpreted as negation. Prepending https://
will probably change twitter's behaviour.?
Zero results when searching for github.com/rss-bridge
: https://rss-bridge.org/bridge01/?action=display&bridge=TwitterBridge&context=By+keyword+or+hashtag&q=github.com%2Frss-bridge&format=Html
Lots results when searching for github.com/laravel
: https://rss-bridge.org/bridge01/?action=display&bridge=TwitterBridge&context=By+keyword+or+hashtag&q=github.com%2Flaravel&format=Html
Interestingly there is also zero results for github.com/rss-bridge
in twitter own website: https://twitter.com/search?q=github.com%2Frss-bridge&src=typed_query&f=live
@arnd-s
We're using RSS-Bridge to search the latest Posts on Twitter containing some specific keywords or hashtags. This worked fine over the years until the service we used stopped working, so we changed hosts (now https://nixnet.services/). After the migration, we noticed that the results we received were different from what we expected. I then tried to search for posts directly on Twitter using the same keywords and there I received the expected output, so something's fishy.
First I thought this would be caused by our new host, so I started using a bunch of different ones, but they all returned the same result. In the end I narrowed it down to one problem: One of our searched keywords is a GitHub profile link "github.com/profile". When using a "/" in one of my keywords, it messes up the complete result. I also tried URL parsing the "/" (%2F) but this just returned an error. If you want to give it a shot, I tried this out with the Twitter Bridge here: https://rss.nixnet.services/
For example, this is the result when I'm just searching for "reactphp" and "x_framework": https://rss.nixnet.services/?action=display&bridge=Twitter&context=By+keyword+or+hashtag&q=reactphp+OR+x_framework&format=Html
And this this is the result when I add a third keyword with a "/" to search for: https://rss.nixnet.services/?action=display&bridge=Twitter&context=By+keyword+or+hashtag&q=reactphp+OR+x_framework+OR+github.com%2Fclue&format=Html
One possible cause for this could be some additional encoding on Twitter's end. As you can see, the URL of my second example contains "github.com%2Fclue", so I think Twitter also encodes the "%" (%25) in this case. I then was able to recreate the wrong result on Twitter, I just had to use this search query: "reactphp OR x_framework OR github.com/clue".
Twitter search without encoded "/" (right behavior): https://twitter.com/search?q=reactphp%20OR%20x_framework%20OR%20github.com%2Fclue&src=typed_query&f=live
Twitter search with encoded "/" (%2F) (wrong behavior): https://twitter.com/search?q=reactphp%20OR%20x_framework%20OR%20github.com%252Fclue&src=typed_query&f=top
The old behavior, before we migrated, used an earlier version of this project, seems like something changed. I don't have much knowledge about the RSS-Bridge API, so I can't really say if it's a bug or not, but it feels like one. I hope you can give me some more insights, could also be possible that I'm doing something wrong here :D
Thanks in advance :+1: