Geeting error in storing image


while executing line 18 its showing wrong url ,i think its bcz as x is string having apostropheis at starting and ending so how can we remove as we can access url and store it in file ??

hey @Ashu1318 ,
Can you please share a screen shot of the error also.
It would be easier for me to understand it in that way.
Thank You

actually i dont know how to share ss so im sharing error through link https://ide.codingblocks.com/s/408028

hey @Ashu1318 ,
if you just check the last line of the error ,
It says that you are providing a wrong url to fetch

You nee to add this url to your base_url also , the current one which you are passing is a referenced one.

okay so how can we do that ??

while doing requests.get(url) in the end

do it like html=requests.get('https://en.wikipedia.org/wiki/Galaxy'+url).text

can plz do it by urself and share link plz

just change x to "https:" + x

it will work

thanks finally its working but can u plz tell me why it as not accessing complete link imean we have added https in front of it

and also intially image was of type bytes so it was showing encode in utf8 after we uses wb in file ??

any url needs to start with www or https. You might know this.
and this was the reason we need to add that.

i didn’t get this one.
Can you please more brief or share an image related to this.

okay thank u very much almost clear ho gya bs ek do doubt or the that i will handle myself

one final que are there any shortcuts to scrap data in upcoming videos or we have do it like this also

or can u plz tell me good resourses/sites to study about these topic more details

there are no as such shortcuts in scraping , we need to learn about the page more first to scrap the data from it.
so , i would say just first go with the videos and after that try something new , like scraping something from amazon , etc.
In this you will surely face some issues , then raise those doubts here and we will help you out of it.

In this way you can learn more and much better.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.