The utils module

This module contains a few helper functions that are used throughout the package

InstaTweet.utils.get_agents()[source]View on GitHub

Scrapes a list of user agents. Returns a default list if the scrape fails.

Note

Deprecated since 2.0.0b13, but might be useful when new endpoint gets patched

Return type

list

InstaTweet.utils.get_agent(index=0)[source]View on GitHub

Returns a single user agent string from the specified index of the AGENTS list

Note

Deprecated since 2.0.0b13, but might be useful when new endpoint gets patched

Return type

str

InstaTweet.utils.get_proxies(env_key)[source]View on GitHub

Retrieve proxies from an environment variable

Return type

Optional[dict]

InstaTweet.utils.get_root()[source]View on GitHub
Return type

Path

InstaTweet.utils.get_filepath(filename, filetype='txt')[source]View on GitHub
Return type

str