Twitter Twitter returns the same trend for different cities?

I am trying to get hashtags for different german cities in python. So, firstly, I get the available trends:

twitter.trends.available(_woeid=23424829)

Then I get trends for each place:

for trend in germany_trends:
    twitter.trends.place(_id=trend['woeid'])[0]['trends']

After that, I filter the results to get the highest tweets tweet_volumefor each city. The problem is that this is the same hashtag for each city. I get 10 different cities from "available trends", but hashtags are 90% similar.

When I look at such a map, https://www.trendsmap.com/ , I wonder what I'm doing wrong. They have many different hashtags in all of these cities.

One example answer, where you can see what I mean, hashtags are almost the same, and the “best” hashtag is the same too:

"DE, Stuttgart": [
    {
        "url": "http://twitter.com/search?q=%23ISIS", 
        "query": "%23ISIS", 
        "tweet_volume": 21646, 
        "name": "#ISIS", 
        "promoted_content": null
    }, 
    {
        "url": "http://twitter.com/search?q=%22Hans+Rosling%22", 
        "query": "%22Hans+Rosling%22", 
        "tweet_volume": 44855, 
        "name": "Hans Rosling", 
        "promoted_content": null
    }, 
    {
        "url": "http://twitter.com/search?q=%22Betsy+DeVos%22", 
        "query": "%22Betsy+DeVos%22", 
        "tweet_volume": 664741, 
        "name": "Betsy DeVos", 
        "promoted_content": null
    }, 
    {
        "url": "http://twitter.com/search?q=Nioh", 
        "query": "Nioh", 
        "tweet_volume": 24160, 
        "name": "Nioh", 
        "promoted_content": null
    }, 
    {
        "url": "http://twitter.com/search?q=%23FCBWOB", 
        "query": "%23FCBWOB", 
        "tweet_volume": 14216, 
        "name": "#FCBWOB", 
        "promoted_content": null
    }, 
    {
        "url": "http://twitter.com/search?q=%23sid2017", 
        "query": "%23sid2017", 
        "tweet_volume": 28277, 
        "name": "#sid2017", 
        "promoted_content": null
    }
], 
"DE, Dresden": [
    {
        "url": "http://twitter.com/search?q=%22Hans+Rosling%22", 
        "query": "%22Hans+Rosling%22", 
        "tweet_volume": 44855, 
        "name": "Hans Rosling", 
        "promoted_content": null
    }, 
    {
        "url": "http://twitter.com/search?q=%22Betsy+DeVos%22", 
        "query": "%22Betsy+DeVos%22", 
        "tweet_volume": 664741, 
        "name": "Betsy DeVos", 
        "promoted_content": null
    }, 
    {
        "url": "http://twitter.com/search?q=Nioh", 
        "query": "Nioh", 
        "tweet_volume": 24160, 
        "name": "Nioh", 
        "promoted_content": null
    }, 
    {
        "url": "http://twitter.com/search?q=%23FCBWOB", 
        "query": "%23FCBWOB", 
        "tweet_volume": 14216, 
        "name": "#FCBWOB", 
        "promoted_content": null
    }, 
    {
        "url": "http://twitter.com/search?q=%23sid2017", 
        "query": "%23sid2017", 
        "tweet_volume": 28277, 
        "name": "#sid2017", 
        "promoted_content": null
    }
], 
+4
2

https://www.trendsmap.com/ . ​​ . , , - , () {'trend':count} {'#sid2017':2,'#FCBWOB':2} 2-3 , .

+2

twitter dev, URL

https://api.twitter.com/1.1/trends/place.json

-
/15- (user auth) = 75
/15- ( auth) = 75

, ,

, , , trump. , ,

+1

Source: https://habr.com/ru/post/1669178/


All Articles