Skip to content
This repository has been archived by the owner on Aug 12, 2024. It is now read-only.

Commit

Permalink
[refactor] rearrange logic of getting few attributes
Browse files Browse the repository at this point in the history
stats 
- tweets_count
- following_count
- followers_count
  • Loading branch information
EricChangGo committed Sep 29, 2020
1 parent c7bbf55 commit f13ec7f
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions twitter_scraper/modules/profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,14 +136,8 @@ def __parse_profile(self, page):
try:
stats_table = html.find('table.profile-stats')[0]
stats = stats_table.find('td div.statnum')
if not stats:
self.tweets_count = None
self.following_count = None
self.followers_count = None
except:
self.tweets_count = None
self.following_count = None
self.followers_count = None
self.stats = None

# get total tweets count if available
try:
Expand Down

0 comments on commit f13ec7f

Please sign in to comment.