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

Fix slow.pics again #169

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion vspreview/plugins/builtins/slowpics_comp/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
from vspreview.models import GeneralModel

from .settings import CompSettings
from .utils import KEYWORD_RE, MAX_ATTEMPTS_PER_PICTURE_TYPE, get_slowpic_upload_headers
from .utils import KEYWORD_RE, MAX_ATTEMPTS_PER_PICTURE_TYPE, get_slowpic_upload_headers, get_slowpic_headers
from .workers import Worker, WorkerConfiguration

__all__ = [
Expand Down Expand Up @@ -399,6 +399,7 @@ def on_public_toggle(self, new_state: bool) -> None:
if self.tag_data_cache is None or self.tag_data_error:
try:
with Session() as sess:
sess.headers.update(get_slowpic_headers(sess))
sess.get('https://slow.pics/comparison')

api_resp = sess.get('https://slow.pics/api/tags').json()
Expand Down Expand Up @@ -549,6 +550,7 @@ def create_slowpics_tags(self) -> list[str]:
tags = list[str]()

with Session() as sess:
sess.headers.update(get_slowpic_headers(sess))
sess.get('https://slow.pics/comparison')

for tag in self.current_tags:
Expand Down
Loading