Skip to content

Cannot access tweets through a ResultStream from behind a proxy #147

Open
@finnhacks42

Description

@finnhacks42

Describe the bug
Trying to stream results from behind a proxy fails with a connection refused error.

HTTPS_PROXY and HTTP_PROXY environment variables are set but are ignored by ResultStream due to line 48 in result_stream.py - in make_session session.trust_env=False

To Reproduce
From behind a proxy,

os.environ['HTTPS_PROXY']='xxx'
os.environ['HTTP_PROXY']='yyy'
creds = load_credentials('twitter_keys.yml',env_overwrite=False)
rule = gen_rule_payload('beyonce', from_date='2022-01-01',to_date='2022-01-07')
rs = ResultStream(rule_payload=rule,**creds)
tweets = list(rs.stream())

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions