Skip to content
This repository has been archived by the owner on Feb 3, 2023. It is now read-only.

Strip down Twitter display again #5

Open
palfrey opened this issue Apr 13, 2021 · 4 comments · May be fixed by #15
Open

Strip down Twitter display again #5

palfrey opened this issue Apr 13, 2021 · 4 comments · May be fixed by #15

Comments

@palfrey
Copy link
Owner

palfrey commented Apr 13, 2021

e.g. https://gasconade.tevp.net/tweet/deniseyu21/1357832814629171201 feels fairly noisy and could probably remove the bottom parts of each tweet

@palfrey
Copy link
Owner Author

palfrey commented Jul 5, 2021

Annoyingly, this is now really hard to do because Twitter now has obfuscated class names. See https://www.reddit.com/r/webdev/comments/goxvtx/question_why_does_twitter_have_these_weird_class/

@palfrey
Copy link
Owner Author

palfrey commented Dec 14, 2022

Also this is now much harder these days because of iFrame cross-origin stuff, so we can't edit the HTML anymore easily. The best way to do this would probably be run the whole thing server-side in a headless browser (maybe using https://github.com/octaltree/playwright-rust?), scrape out the HTML blocks and do the rewriting there.

@palfrey
Copy link
Owner Author

palfrey commented Dec 15, 2022

Playwright is unusable, as the nth selector and lots more features only came in more recently (1.14), but the playwright-rust isn't very maintained and only supports 1.11. Back to Selenium we go!

@palfrey palfrey linked a pull request Dec 17, 2022 that will close this issue
@palfrey
Copy link
Owner Author

palfrey commented Dec 17, 2022

#15 does most of this. However, a lot of the CSS classes are some sort of React magic, and I can't figure out how to dump them yet.

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

Successfully merging a pull request may close this issue.

1 participant