Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

not work in linux when behind proxy #7

Open
prunith opened this issue Jan 28, 2022 · 1 comment
Open

not work in linux when behind proxy #7

prunith opened this issue Jan 28, 2022 · 1 comment

Comments

@prunith
Copy link

prunith commented Jan 28, 2022

Hi
i m trying to use scrapetube on ubuntu 20.04 Python 3.8.10 behind company proxy setup-ed as follow:
proxies = {"http": "http://x.x.253.137:80","https": "http://x.x.253.137:80"}

scrapetube return:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/blairfancy/.local/lib/python3.8/site-packages/scrapetube/scrapetube.py", line 121, in get_search
    for video in videos:
  File "/home/blairfancy/.local/lib/python3.8/site-packages/scrapetube/scrapetube.py", line 138, in get_videos
    client = json.loads(
  File "/usr/lib/python3.8/json/__init__.py", line 357, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.8/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.8/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

I suspect that proxy block connection.

@zhirshya
Copy link

I have similar problem, on ubuntu 20.04 with Python 3.
I set shell export HTTP_PROXY and HTTPS_PROXY.
Doing "scrapetube.get_channel" got
...line 7, in
for video in videos:
File "/home/dvlpr/.local/lib/python3.8/site-packages/scrapetube/scrapetube.py", line 46, in get_channel
for video in videos:
File "/home/dvlpr/.local/lib/python3.8/site-packages/scrapetube/scrapetube.py", line 138, in get_videos
client = json.loads(
File "/usr/lib/python3.8/json/init.py", line 357, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.8/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.8/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 2 (char 1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants