Skip to content

Commit

Permalink
v2.1.11
Browse files Browse the repository at this point in the history
  • Loading branch information
davidwickerhf committed Dec 5, 2020
1 parent 2b74b83 commit 944c4d5
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
10 changes: 10 additions & 0 deletions instaclient/classes/baseprofile.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,16 @@ def __init__(self, id:str, viewer:str, username:str, name:str):
def __repr__(self) -> str:
return f'BaseProfile<{self.username}>'

def __eq__(self, o: object) -> bool:
if not isinstance(o, BaseProfile):
return False
try:
self_id = self.get_id()
o_id = o.get_id()
return self_id == o_id
except:
return self.username == o.username

def from_username(username:str):
request = GraphUrls.GRAPH_USER.format(username)
result = requests.get(request)
Expand Down
2 changes: 0 additions & 2 deletions instaclient/client/instaclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,6 @@ def login(self, username:str, password:str, check_user:bool=True, discard_driver
self.__dismiss_cookies()

# Get Form elements
if self.debug:
self.error_callback(self.driver)
username_input = self.__find_element(EC.presence_of_element_located((By.XPATH,Paths.USERNAME_INPUT)), url=ClientUrls.LOGIN_URL)
password_input = self.__find_element(EC.presence_of_element_located((By.XPATH,Paths.PASSWORD_INPUT)), url=ClientUrls.LOGIN_URL)
self.logger.debug('INSTACLIENT: Found elements')
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
setup(
name = 'instaclient', # How you named your package folder (MyLib)
packages = find_packages(exclude=['tests, drivers']), # Chose the same as "name"
version = '2.1.10', # Start with a small number and increase it with every change you make
version = '2.1.11', # Start with a small number and increase it with every change you make
license='MIT', # Chose a license from here: https://help.github.com/articles/licensing-a-repository
description = 'Instagram client built with Python 3.8 and the Selenium package.',
long_description=README,
long_description_content_type="text/markdown",
author = 'David Wicker', # Type in your name
author_email = 'davidwickerhf@gmail.com', # Type in your E-Mail
url = 'https://github.com/wickerdevs/py-instaclient', # Provide either the link to your github or to your website
download_url = 'https://github.com/wickerdevs/py-instaclient/archive/v2.1.10.tar.gz', # I explain this later on
download_url = 'https://github.com/wickerdevs/py-instaclient/archive/v2.1.11.tar.gz', # I explain this later on
keywords = ['INSTAGRAM', 'BOT', 'INSTAGRAM BOT', 'INSTAGRAM CLIENT'], # Keywords that define your package best
install_requires=[ # I get to this in a second
'selenium',
Expand Down

0 comments on commit 944c4d5

Please sign in to comment.