Twint: Twitter Legacy Theme Deprecation - May impact Twint functionality from 01/06/2020

Created on 18 May 2020  路  5Comments  路  Source: twintproject/twint

Description of Issue

Twitter legacy UI deprecation - DigitalInformationWorld
As described in the article above, Twitter will be deprecating the legacy theme from 1st June 2020. It seems as though this may impact at least some functionality in Twint.

Potential affected areas seem to be restricted to code calling get.py, specifically the RandomUserAgent method:

  • if self.config.TwitterSearch (which is the only case that sets the wa arg here to true), where the user agent is specifically set to Mozilla/5.0 (Windows NT 6.4; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2225.0 Safari/537.36"
  • else, where the user agent is set using FakeUserAgent library, which may contain user agents which do no longer work after the deprecation
  • if the above if/else fails, the user agent is set to one of a random list of hardcoded user agents, which may contain values that are affected by the deprecation.

I will continue looking into this, but raising now for visibility.

Most helpful comment

I suddenly started getting the error:

CRITICAL:root:twint.get:User:'NoneType' object is not subscriptable

when I try using twint.run.Lookup(c).
Installing with pip3 install --user --upgrade git+https://github.com/twintproject/twint.git@origin/master#egg=twint doesn't solve the problem.

All 5 comments

604

Currently down, still possible to run searches on mobile version

https://mobile.twitter.com/search?q=from%3Anoneprivacy&s=typd&x=0&y=0

I believe that this is working not because of the mobile url, but instead because the search endpoint returns a json payload, which is handled differently than most of the other types of data collected (e.g. user profile, follower/following list, profile based tweet collection).

I suddenly started getting the error:

CRITICAL:root:twint.get:User:'NoneType' object is not subscriptable

when I try using twint.run.Lookup(c).
Installing with pip3 install --user --upgrade git+https://github.com/twintproject/twint.git@origin/master#egg=twint doesn't solve the problem.

@aksub99 I get the same error on my machine. It working when testing offline doesn't when I deploy to Heroku

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dmuth picture dmuth  路  4Comments

nachotp picture nachotp  路  3Comments

anderl80 picture anderl80  路  3Comments

PatricioAlvarado picture PatricioAlvarado  路  4Comments

cbjrobertson picture cbjrobertson  路  5Comments