Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # youtube-dl_backtrack.py ^ when past expiry
- import win32clipboard
- win32clipboard.OpenClipboard()
- data = win32clipboard.GetClipboardData()
- win32clipboard.CloseClipboard()
- yt="https://www.youtube.com/watch?v="
- bbb=[]
- for z in data.splitlines():
- z=z.split('video_id=')[-1]
- z=z.split('&t=')[0]
- bbb.append(yt+z)
- #
- web="""<!DOCTYPE html>
- <html>
- <head></head>
- <body><p>@</p></body>
- </html>"""
- ccc='<br>'.join(bbb)
- import tempfile
- import webbrowser
- srcfilename=tempfile.mktemp(".html", "demo_")
- temp=open(srcfilename, 'w')
- temp.write(web.replace('@',ccc))
- webbrowser.open_new_tab(srcfilename)
- temp.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement