Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Getting Extension
#5
import requests
import youtube_dl
r = requests.get("https://www.google.com")
from mimetypes import guess_extension
print(guess_extension(r.headers['content-type'].partition(';')[0].strip()))
Can Above Code WOrk?
Reply


Messages In This Thread
Getting Extension - by Harshil - Aug-22-2020, 06:35 AM
RE: Getting Extension - by ndc85430 - Aug-22-2020, 07:11 AM
RE: Getting Extension - by Harshil - Aug-22-2020, 07:12 AM
RE: Getting Extension - by ndc85430 - Aug-22-2020, 07:14 AM
RE: Getting Extension - by Harshil - Aug-22-2020, 07:20 AM
RE: Getting Extension - by ndc85430 - Aug-22-2020, 07:20 AM
RE: Getting Extension - by Harshil - Aug-22-2020, 07:24 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020