![](https://lemmy.ml/pictrs/image/10f7b966-8580-4aa6-aef0-db020875ed9a.png)
![](https://lemmy.ml/pictrs/image/h1ChnLuBHr.png)
It’s just a simple Flask server. I parse the user-agent using the user_agents
Python library, apply some conditionals upon the result, render the image using Pillow and send it to the user.
It’s just a simple Flask server. I parse the user-agent using the user_agents
Python library, apply some conditionals upon the result, render the image using Pillow and send it to the user.
The user-agent detection definitely isn’t great. If it doesn’t recognize a client, it just says unknown. But that wasn’t the main point of the post anyway, this was just meant as a quick proof of concept for anyone curious.
Thought about adding the user’s location, but was worried PythonAnywhere could somehow cache the image between multiple people. A great demo though!
This is possible because Lemmy doesn’t proxy external images but instead loads them directly. While not all that bad, this could be used for Spy pixels by nefarious posters and commenters.
Note, that the only thing that I willingly log is the “hit count” visible in the image, and I have no intention to misuse the data.
This is possible because Lemmy doesn’t proxy external images but instead loads them directly. While not all that bad, this could be used for Spy pixels by nefarious posters and commenters.
Note, that the only thing that I willingly log is the “hit count” visible in the image, and I have no intention to misuse the data.
This is possible because Lemmy doesn’t proxy external images but instead loads them directly. While not all that bad, this could be used for Spy pixels by nefarious posters and commenters.
Note, that the only thing that I willingly log is the “hit count” visible in the image, and I have no intention to misuse the data.
Oh, how did I not notice that before? Now should be fixed.