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

Fixes downloading media #40

Merged
merged 1 commit into from
Jun 13, 2024
Merged

Fixes downloading media #40

merged 1 commit into from
Jun 13, 2024

Conversation

javiercr
Copy link
Member

@javiercr javiercr commented Jun 13, 2024

Twitter is now using https://ton.x.com/i/ton/[...] for media sent over DM, despite their API still returning urls using https://ton.twitter.com/1.1/ton/[...].

They do the same replace proposed in this PR in their own JS bundle:

image

https://abs.twimg.com/responsive-web/client-web/main.87b67eda.js

Copy link
Member

@tulir tulir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😹

@javiercr javiercr merged commit 9487bf0 into master Jun 13, 2024
5 checks passed
@javiercr javiercr deleted the fix/download-media branch June 13, 2024 18:05
@javiercr
Copy link
Member Author

As a side note: the old URL returns a 302 redirect to the new one, problem was that the HTTP client we use was not passing the cookies to the new URL. To avoid the extra HTTP call (redirected) I just fixed the first call as they do.

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

Successfully merging this pull request may close these issues.

2 participants