Http://api.icndb.com/jokes/15

I am scraping from “http://api.icndb.com/jokes” this api with id ‘15’ and save that joke into csv file in my local env.
But when i m trying to upload > it shows accuracy 0% :frowning:
Why?

hey @snehill090 ,
can you please share me your submission file.

will look into it and let you know

my script>> from urllib.request import urlopen from bs4 import BeautifulSoup import json url = f"http://api.icndb.com/jokes/15" response = urlopen(url) data = response.read() json_data = json.loads(data) print(json_data[‘value’][‘joke’]) joke = json_data[‘value’][‘joke’] filename = ‘joke.csv’ with open(filename, ‘w’) as f: f.write(joke) file content(“joke.csv”)> When Chuck Norris goes to donate blood, he declines the syringe, and instead requests a hand gun and a bucket.

hey @snehill090 ,
You might be provided with a ID.csv file.
it contains those Joke IDs that you need to search to get your task done.

so, create a submission file like
Id , respective joke
Id , respective joke
Id , respective joke
Id , respective joke

in this manner then you can get your score.

You mean like this> {‘id’: 15, ‘joke’: ‘When Chuck Norris goes to donate blood, he declines the syringe, and instead requests a hand gun and a bucket.’} ??

hey @snehill090 ,
no not in dictionary. kind of csv file.

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.