farisachugthai / instapy

Example usage of the InstaPy library or Instagrams unofficial API.

Home Page:https://farisachugthai.github.io/instapy/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Automating the Browser

.. module:: instapy_00
   :synopsis: Automating the browser and finding the login buttons.

Oddly is proving to be quite difficult.

The methods of a selenium.Firefox() object

pprint.pprint(dir(browser))
['CONTEXT_CHROME',
'CONTEXT_CONTENT',
'NATIVE_EVENTS_ALLOWED',
'__class__',
'__delattr__',
'__dict__',
'__dir__',
'__doc__',
'__enter__',
'__eq__',
'__exit__',
'__format__',
'__ge__',
'__getattribute__',
'__gt__',
'__hash__',
'__init__',
'__init_subclass__',
'__le__',
'__lt__',
'__module__',
'__ne__',
'__new__',
'__reduce__',
'__reduce_ex__',
'__repr__',
'__setattr__',
'__sizeof__',
'__str__',
'__subclasshook__',
'__weakref__',
'_file_detector',
'_is_remote',
'_mobile',
'_switch_to',
'_unwrap_value',
'_web_element_cls',
'_wrap_value',
'add_cookie',
'application_cache',
'back',
'binary',
'capabilities',
'close',
'command_executor',
'context',
'create_web_element',
'current_url',
'current_window_handle',
'delete_all_cookies',
'delete_cookie',
'desired_capabilities',
'error_handler',
'execute',
'execute_async_script',
'execute_script',
'file_detector',
'file_detector_context',
'find_element',
'find_element_by_class_name',
'find_element_by_css_selector',
'find_element_by_id',
'find_element_by_link_text',
'find_element_by_name',
'find_element_by_partial_link_text',
'find_element_by_tag_name',
'find_element_by_xpath',
'find_elements',
'find_elements_by_class_name',
'find_elements_by_css_selector',
'find_elements_by_id',
'find_elements_by_link_text',
'find_elements_by_name',
'find_elements_by_partial_link_text',
'find_elements_by_tag_name',
'find_elements_by_xpath',
'firefox_profile',
'forward',
'fullscreen_window',
'get',
'get_cookie',
'get_cookies',
'get_log',
'get_screenshot_as_base64',
'get_screenshot_as_file',
'get_screenshot_as_png',
'get_window_position',
'get_window_rect',
'get_window_size',
'implicitly_wait',
'install_addon',
'log_types',
'minimize_window',
'mobile',
'name',
'orientation',
'page_source',
'profile',
'quit',
'refresh',
'save_screenshot',
'service',
'session_id',
'set_context',
'set_page_load_timeout',
'set_script_timeout',
'set_window_position',
'set_window_rect',
'set_window_size',
'start_client',
'start_session',
'stop_client',
'switch_to',
'switch_to_active_element',
'switch_to_alert',
'switch_to_default_content',
'switch_to_frame',
'switch_to_window',
'title',
'uninstall_addon',
'w3c',
'window_handles']

So by count that's like 130 methods. vars(browser) didn't give me a ton so apparently the magic is in the methods.

API

.. literalinclude:: ../../instapy_01.py
   :language: python
   :linenos:

.. automodule:: additional_features
   :members:

About

Example usage of the InstaPy library or Instagrams unofficial API.

https://farisachugthai.github.io/instapy/

License:MIT License


Languages

Language:Jupyter Notebook 53.1%Language:Python 46.9%