Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Weird HTML code looks like this b'\xff\xd8\xff\xe0

Tags:

python

html

I'm using python to retrieve an HTML source, but what comes out looks like this. What is this, and why am I not getting the actual page source?

b'\xff\xd8\xff\xe0\x00\x10JFIF\x00\x01\x01\x00\x00\x01\x00\x01\x00\x00\xff\xdb\x00C

like image 486
user5508043 Avatar asked Oct 28 '25 16:10

user5508043


1 Answers

This is an image. Specifically a jpeg. Since it's a byte stream python prints it with b'.............' A jpeg starts with \xff\xd8\xff\

like image 135
click_twice Avatar answered Oct 30 '25 06:10

click_twice



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!