r/rickroll 12d ago

Rickroll Rickroll python

J'aimerais piégé un ami a l'aide d'un programme python qui lance un rickroll a son ouverture. Soit le programme ouvrirait une page Youtube. Ou alors il ouvrirait une vidéo directement. Soit d'une autre façon si vous avez une autre façon. Je prends toutes les informations qui pourrait être utiles. Mercie.

9 Upvotes

5 comments sorted by

3

u/RedditFireBall 12d ago edited 12d ago

``` import webbrowser

webbrowser.open("https://youtu.be/dQw4w9WgXcQ") ```

2

u/RedditFireBall 12d ago

It just uses the webbrowser module to open the video with your default browser

1

u/Imaginary-Builder385 12d ago

Un grand merci. J'ai essayer et j'ai meme mis une vidéo mieux que le rickroll original.

import webbrowser
webbrowser.open("https://www.youtube.com/watch?v=QKr_0DMYV5g")

1

u/rileydawelder69 10d ago

I would make it an executable file and when using pyinstaller, add the --add-data flag to the command with a downloaded video so that it will work offline and without lag.

1

u/rileydawelder69 10d ago

Note that you would need subprocess or smthn to play the video through meipass or something