-
Notifications
You must be signed in to change notification settings - Fork 308
Twitter user avatars are broken #1936
Comments
Appears to be a Twitter issue: https://dev.twitter.com/discussions/25385. |
Here's a script to convert BEGIN;
UPDATE elsewhere SET user_info=user_info || (
'profile_image_url_https'=>(
'https://pbs.' || substring(user_info->'profile_image_url_https' from 11)
)
) WHERE platform='twitter';
SELECT user_info->'profile_image_url_https' FROM elsewhere WHERE platform='twitter';
ROLLBACK;
END; |
Still borken. |
@whit537 do all URLs in the database use |
Is there any correlation between the 4431 users with a Are there any other subdomains in use? |
@seanlinsley I really don't know. But I know that there is more subdomains on twtimg (like a0). I sugest to change @whit537 SQL and make a script that do this. (pseudo code)
|
Some of these are coming back, others aren't. MaxCDN and Bountysource are back, UkuleleRod isn't. Could be because the first two have logged in since this started. |
Confirmed: MaxCDN and Bountysource are now on |
What's the harm in switching everyone who is |
#!/usr/bin/env python
import requests, sys
for i, line in enumerate(open('twimg.csv')):
url = line.strip()
response = requests.get(url)
if response.status_code != 200:
print response.status_code, url
sys.stdout.flush() I'm running that script against 18,960 URLs. Will report back ... |
Just don't do it from production :D |
:-)
The script died before reaching 18,960, not sure why. Also, why are the |
Blech. This sucks. |
The right ways to fix this are:
Neither of those is trivial. |
There's a script in #1989 to fix this as a one-off. Spinning up a DO VPS to run it (using the payday image) ... |
The script died mysteriously (forgot to redirect stderr :/ ) after processing 4036 accounts. Before rerunning it's probably worth rewriting to use users/lookup (100 at a time) instead of users/show (one at a time), per #1989 (comment). |
Rewrote the script to use lookup and rerunning it now. It still has a 5-second sleep between hits. If we were under 18,000 we could fit inside one 15 minute window, but we're at ~19,000. |
This should be done in 15-20 minutes. |
Done! 💃 |
Here's a one-off script for #1936
This is currently being discussed in IRC.
The text was updated successfully, but these errors were encountered: