mirror of
https://github.com/instaloader/instaloader.git
synced 2024-11-19 16:52:30 +01:00
Add versionadded directives and spacings
This commit is contained in:
parent
bf396f0e6c
commit
7cc13ee08e
@ -213,6 +213,8 @@ Instaloader to login.
|
|||||||
|
|
||||||
Cookie file path of a browser profile to load cookies from.
|
Cookie file path of a browser profile to load cookies from.
|
||||||
|
|
||||||
|
.. versionadded:: 4.11
|
||||||
|
|
||||||
.. option:: --sessionfile SESSIONFILE, -f SESSIONFILE
|
.. option:: --sessionfile SESSIONFILE, -f SESSIONFILE
|
||||||
|
|
||||||
Path for loading and storing session key file. Defaults to
|
Path for loading and storing session key file. Defaults to
|
||||||
|
@ -72,6 +72,7 @@ def filterstr_to_filterfunc(filter_str: str, item_type: type):
|
|||||||
|
|
||||||
return filterfunc
|
return filterfunc
|
||||||
|
|
||||||
|
|
||||||
def get_cookies_from_instagram(domain, browser, cookie_file='', cookie_name=''):
|
def get_cookies_from_instagram(domain, browser, cookie_file='', cookie_name=''):
|
||||||
supported_browsers = {
|
supported_browsers = {
|
||||||
"chrome": browser_cookie3.chrome,
|
"chrome": browser_cookie3.chrome,
|
||||||
@ -104,6 +105,7 @@ def get_cookies_from_instagram(domain, browser, cookie_file='', cookie_name=''):
|
|||||||
else:
|
else:
|
||||||
return cookies
|
return cookies
|
||||||
|
|
||||||
|
|
||||||
def import_session(browser, instaloader, cookiefile):
|
def import_session(browser, instaloader, cookiefile):
|
||||||
cookie = get_cookies_from_instagram('instagram', browser, cookiefile)
|
cookie = get_cookies_from_instagram('instagram', browser, cookiefile)
|
||||||
if cookie is not None:
|
if cookie is not None:
|
||||||
@ -117,6 +119,7 @@ def import_session(browser, instaloader, cookiefile):
|
|||||||
"and to make full use of instaloader's features.")
|
"and to make full use of instaloader's features.")
|
||||||
print(textwrap.fill(next_step_text))
|
print(textwrap.fill(next_step_text))
|
||||||
|
|
||||||
|
|
||||||
def _main(instaloader: Instaloader, targetlist: List[str],
|
def _main(instaloader: Instaloader, targetlist: List[str],
|
||||||
username: Optional[str] = None, password: Optional[str] = None,
|
username: Optional[str] = None, password: Optional[str] = None,
|
||||||
sessionfile: Optional[str] = None,
|
sessionfile: Optional[str] = None,
|
||||||
|
@ -212,6 +212,7 @@ class InstaloaderContext:
|
|||||||
return requests.utils.dict_from_cookiejar(self._session.cookies)
|
return requests.utils.dict_from_cookiejar(self._session.cookies)
|
||||||
|
|
||||||
def update_cookies(self, cookie):
|
def update_cookies(self, cookie):
|
||||||
|
""".. versionadded:: 4.11"""
|
||||||
self._session.cookies.update(cookie)
|
self._session.cookies.update(cookie)
|
||||||
|
|
||||||
def load_session(self, username, sessiondata):
|
def load_session(self, username, sessiondata):
|
||||||
|
Loading…
Reference in New Issue
Block a user