■ ■ ■ ■ ■ ■
socialmediascraper/modules/googleplus.py
snscrape/modules/googleplus.py
skipped 2 lines 3 3 import json 4 4 import logging 5 5 import re 6 - import socialmediascraper.base 6 + import snscrape.base 7 7 8 8 9 9 logger = logging.getLogger(__name__) 10 10 11 11 12 - class GooglePlusUserScraper(socialmediascraper .base.Scraper): 12 + class GooglePlusUserScraper(snscrape .base.Scraper): 13 13 name = 'googleplus-user' 14 14 15 15 def __init__(self, user, **kwargs): skipped 32 lines 48 48 logger.info('User has no posts') 49 49 return 50 50 for postObj in response[0][7]: 51 - yield socialmediascraper .base.URLItem(f'https://plus.google.com/{postObj[6]["33558957"][21]}') 51 + yield snscrape .base.URLItem(f'https://plus.google.com/{postObj[6]["33558957"][21]}') 52 52 cursor = response[0][1] # 'ADSJ_x' 53 53 if cursor is None: 54 54 # No further pages skipped 31 lines 86 86 response = json.JSONDecoder().raw_decode(''.join(garbage[pos:]))[0] # Parses only the first structure in the data stream without throwing an error about the extra data at the end 87 87 88 88 for postObj in response[0][2]['74333095'][0][7]: 89 - yield socialmediascraper .base.URLItem(f'https://plus.google.com/{postObj[6]["33558957"][21]}') 89 + yield snscrape .base.URLItem(f'https://plus.google.com/{postObj[6]["33558957"][21]}') 90 90 91 91 cursor = response[0][2]['74333095'][0][1] 92 92 skipped 11 lines