[pornhub] fix '400 Bad Request' when logged in (#8942)

extract 'token' from a different location
This commit is contained in:
Mike Fährmann
2026-01-27 10:04:24 +01:00
parent f6ce8c8579
commit 105e2379d4

View File

@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Copyright 2019-2025 Mike Fährmann
# Copyright 2019-2026 Mike Fährmann
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
@@ -85,7 +85,7 @@ class PornhubGalleryExtractor(PornhubExtractor):
extr = text.extract_from(self.request(url).text)
title = extr("<title>", "</title>")
self._token = extr('name="token" value="', '"')
self._token = extr('data-token="', '"')
score = extr('<div id="albumGreenBar" style="width:', '"')
views = extr('<div id="viewsPhotAlbumCounter">', '<')
tags = extr('<div id="photoTagsBox"', '<script')