mot able to fetch jokes from chuck norris webite based on id
Chuck norris database jokes fetch
Just this piece of code
test = pd.read_csv("Test/ID.csv").values jokes = [] for i in test: res = requests.get("http://api.icndb.com/jokes/{}".format(int(i))) joke = json.loads(res.content)['value']['joke'] jokes.append(joke)
You will get jokes list
how to extract jokes from html url?
using beautiful soup
This question requires the concept of API calls not scrapping using beautiful soup.
You use BS when you have to get some small portion of the content from a website.
In this case, the URL itself returns a json format. It is not a website.
i m getting truble reading id.csv files?
can u send the full oslution?
my code is not working
thankyou
for the clarification
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.