From 4d8faaf29342bac8b8889ba62eb1e51f2fe02e1d Mon Sep 17 00:00:00 2001 From: dylen <43640014+refroyx@users.noreply.github.com> Date: Tue, 26 Nov 2019 10:53:53 +0300 Subject: [PATCH] Error getting profile. Some existing profiles simply do not have a location, and in these cases the library throws an error. For example this https://twitter.com/just_dylen --- twitter_scraper/modules/profile.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/twitter_scraper/modules/profile.py b/twitter_scraper/modules/profile.py index baa0aa5..e4a4e8e 100644 --- a/twitter_scraper/modules/profile.py +++ b/twitter_scraper/modules/profile.py @@ -36,6 +36,9 @@ def __parse_profile(self, page): except AttributeError: raise ValueError( f'Oops! Either "@{self.username}" does not exist or is private.') + except IndexError: + pass + # parse birthday try: