`Connection()` and `User()` in one script
"""
_token_regex = re.compile(r'content="(.*?)"\s+name="csrf-token')
_userinfo_regex = re.compile(r'window.current_user_attributes = ({.*})')
- login_data = {}
- token = ''
def __init__(self, pod, username='', password=''):
"""
"""
self.pod = pod
self.session = requests.Session()
+ self.login_data = {}
+ self.token = ''
try:
self._setlogin(username, password)
except Exception as e:
optional parameters. GUID takes precedence over handle when fetching
user stream. When fetching user data, handle is required.
"""
- data = {}
- stream = []
-
def __init__(self, connection, guid='', handle='', fetch='posts', id=0):
self._connection = connection
+ self.stream = []
self.data = {
'guid': guid,
'handle': handle,
:type tag: str
"""
self._connection = connection
- self._location = 'tags/{0}'.format(tag)
+ self._location = 'tags/{0}.json'.format(tag)
self.fill()