Errors when running tiktok-hashtag-analysis by bellingcat

Has anyone used the tiktok-hashtag-analysis tool by bellingcat? I’ve been getting errors when running the code and reaching out to the community for guidance.

I satisfied all their pre-requisites. I am not familiar with Python. The exact code I ran as specified on the developer’s website is:

janedoe-MacBook-Pro:pythonScript janedoe$ tiktok-hashtag-analysis japan paris

The exact errors that I am getting are:

2024-02-29 20:37:04 INFO | Writing data to directory: /Users/janedoe/tiktok_hashtag_data
2024-02-29 20:37:25 WARNING | Encountered error None -> TikTok returned an empty response when fetching data, retrying in headed mode
2024-02-29 20:37:38,637 - TikTokApi.tiktok - ERROR - Got an unexpected status code: {'log_pb': {'impr_id': '20240301013738A2B73E65CF69CD0E9B9E'}, 'statusCode': 10201, 'statusMsg': '', 'status_code': 10201, 'status_msg': ''}
2024-02-29 20:37:38,637 - TikTokApi.tiktok - ERROR - Got an unexpected status code: {'log_pb': {'impr_id': '20240301013738A2B73E65CF69CD0E9B9E'}, 'statusCode': 10201, 'statusMsg': '', 'status_code': 10201, 'status_msg': ''}
2024-02-29 20:37:38 ERROR | Got an unexpected status code: {'log_pb': {'impr_id': '20240301013738A2B73E65CF69CD0E9B9E'}, 'statusCode': 10201, 'statusMsg': '', 'status_code': 10201, 'status_msg': ''}
2024-02-29 20:37:38 WARNING | No posts were found for the hashtag: japan
2024-02-29 20:37:38 INFO | Scraped 0 new posts containing the hashtag 'japan', with 0 posts previously scraped
2024-02-29 20:37:47 WARNING | Encountered error None -> TikTok returned an empty response when fetching data, retrying in headed mode
2024-02-29 20:37:59,122 - TikTokApi.tiktok - ERROR - Got an unexpected status code: {'log_pb': {'impr_id': '20240301013759BC4F3F89CAFA6A0E1FF2'}, 'statusCode': 10201, 'statusMsg': '', 'status_code': 10201, 'status_msg': ''}
2024-02-29 20:37:59,122 - TikTokApi.tiktok - ERROR - Got an unexpected status code: {'log_pb': {'impr_id': '20240301013759BC4F3F89CAFA6A0E1FF2'}, 'statusCode': 10201, 'statusMsg': '', 'status_code': 10201, 'status_msg': ''}
2024-02-29 20:37:59,122 - TikTokApi.tiktok - ERROR - Got an unexpected status code: {'log_pb': {'impr_id': '20240301013759BC4F3F89CAFA6A0E1FF2'}, 'statusCode': 10201, 'statusMsg': '', 'status_code': 10201, 'status_msg': ''}
2024-02-29 20:37:59,122 - TikTokApi.tiktok - ERROR - Got an unexpected status code: {'log_pb': {'impr_id': '20240301013759BC4F3F89CAFA6A0E1FF2'}, 'statusCode': 10201, 'statusMsg': '', 'status_code': 10201, 'status_msg': ''}
2024-02-29 20:37:59 ERROR | Got an unexpected status code: {'log_pb': {'impr_id': '20240301013759BC4F3F89CAFA6A0E1FF2'}, 'statusCode': 10201, 'statusMsg': '', 'status_code': 10201, 'status_msg': ''}
2024-02-29 20:37:59 WARNING | No posts were found for the hashtag: paris
2024-02-29 20:37:59 INFO | Scraped 0 new posts containing the hashtag 'paris', with 0 posts previously scraped

Whenever I run the code in the terminal, it opens the TikTok log-in page in Chromium incognito, and the page automatically closes after 1 or 2 seconds. I perhaps thought it was not being logged in that scraped 0 results. But the incognito page closes so quickly before I can even click log-in.

This is not a question about python.
It is about software written in python (I assume).

In which case you are best off asking the authors of that code how best to run it.

2 Likes