qutebrowser / qutebrowser

A keyboard-driven, vim-like browser based on Python and Qt.
https://www.qutebrowser.org/
GNU General Public License v3.0
9.45k stars 1.01k forks source link

nitter.poast.org not working with qutebrowser #8216

Closed intuser closed 3 weeks ago

intuser commented 3 weeks ago

Version info:

qutebrowser v2.5.4 Git commit: Backend: QtWebEngine 5.15.16, based on Chromium 87.0.4280.144 Qt: 5.15.13

CPython: 3.12.3 PyQt: 5.15.10

sip: 6.7.12 colorama: 0.4.6 jinja2: 3.1.2 pygments: 2.17.2 yaml: 6.0.1 adblock: no PyQt5.QtWebEngineWidgets: yes PyQt5.QtWebEngine: 5.15.6 PyQt5.QtWebKitWidgets: no pdf.js: no sqlite: 3.45.1 QtNetwork SSL: OpenSSL 3.0.13 30 Jan 2024

Style: QFusionStyle Platform plugin: wayland OpenGL: AMD, 4.6 (Compatibility Profile) Mesa 24.0.5-1ubuntu1 Platform: Linux-6.8.0-31-generic-x86_64-with-glibc2.39, 64bit Linux distribution: Ubuntu 24.04 LTS (ubuntu) Frozen: False Imported from /usr/lib/python3/dist-packages/qutebrowser Using Python from /usr/bin/python3 Qt library executable path: /usr/lib/x86_64-linux-gnu/qt5/libexec, data path: /usr/share/qt5

Paths: cache: /tmp/qutebrowser-basedir-38nnu3qo/cache config: /tmp/qutebrowser-basedir-38nnu3qo/config data: /tmp/qutebrowser-basedir-38nnu3qo/data runtime: /tmp/qutebrowser-basedir-38nnu3qo/runtime system data: /usr/share/qutebrowser

Autoconfig loaded: yes Config.py: no config.py was loaded Uptime: 0:00:12 Does the bug happen if you start with --temp-basedir?:

Yes

Description

nitter.poast.org is one of the very few ways to access twitter posts without login in into twitter. While I can access the site with e.g. firefox, trying to access it with qutebrowser results into a 403, forbidden error.

How to reproduce

Visit nitter.poast.org with qutebrowser. The error message will appear (independent of the version of qutebrowser and of javascript). With firefox there is no problem.

toofar commented 3 weeks ago

I managed to get two different 403s! Firstly this one when going there with plain http image

Then this one after loading it on an old webengine version (5.15, same as you) image

I assume you are seeing the second one, and it's because it's blocking older browser engines. Unfortunately it looks like ubuntu and debian aren't shipping a qutebrowser version that supports Qt6. I suggest installing a newer qutebrowser and using the system wide Qt version (since you are on a recent ubuntu version) as described here: https://qutebrowser.org/doc/install.html#tox (that's checkout the repo then mkvenv.py --pyqt-type link).

Alternately you can get in by faking your user agent, but actually using a newer backend is strongly recommended!

The-Compiler commented 3 weeks ago

A :set -u nitter.poast.org content.headers.user_agent "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) QtWebEngine/6.7.1 Chrome/118.0.5993.220 Safari/537.36" seems to work around this, but yep, the proper solution is to use a more up-to-date setup that's not based on Chromium 87 from late 2020.