httpmorph icon indicating copy to clipboard operation
httpmorph copied to clipboard

Problems with requesting youtube channel page

Open rumca-js opened this issue 1 year ago • 1 comments

Example code

    import httpmorph
    response =  httpmorph.get("https://www.youtube.com/channel/UCXuqSBlHAE6Xw-yeJA0Tunw", timeout=30)
    print(reponse.status_code)
Traceback (most recent call last):
  File "/home/hunter/WorkDir/git/crawler-buddy/manual_test.py", line 207, in <module>
    main()
  File "/home/hunter/WorkDir/git/crawler-buddy/manual_test.py", line 205, in main
    test_urls()
  File "/home/hunter/WorkDir/git/crawler-buddy/manual_test.py", line 198, in test_urls
    response =  httpmorph.get("https://www.youtube.com/channel/UCXuqSBlHAE6Xw-yeJA0Tunw", timeout=30)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/hunter/.cache/pypoetry/virtualenvs/crawler-buddy-sKUXuEBu-py3.12/lib/python3.12/site-packages/httpmorph/_client_c.py", line 959, in get
    return get_default_session().get(url, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/hunter/.cache/pypoetry/virtualenvs/crawler-buddy-sKUXuEBu-py3.12/lib/python3.12/site-packages/httpmorph/_client_c.py", line 910, in get
    return self.request("GET", url, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/hunter/.cache/pypoetry/virtualenvs/crawler-buddy-sKUXuEBu-py3.12/lib/python3.12/site-packages/httpmorph/_client_c.py", line 825, in request
    raise Timeout(error_msg)
httpmorph._client_c.Timeout: Request timed out

Proposition

  • introduce manual tests to your project
  • test pages like youtube.com, x.com, reddit.com, etc

rumca-js avatar Nov 10 '25 16:11 rumca-js

@rumca-js Thank you for the proposition. I'll check why they might be failing and add them to the examples.

arman-bd avatar Nov 10 '25 22:11 arman-bd