Skip to content

Tag: api

how to direct python to fetch string in a different file

how do i change the “keyword” in parameter (‘pegasus’) to redirect to a separate txt file. so later I just write whatever items I want to scrape in the file txt. Example of Pegasus, Phoenix, Lucid then the keyword parameter is directed to a different txt, inside the txt it contains a l…

How to handle an error and make it a result

I’m checking whether the TikTok live video is (live now) or (ended). Since it is hard to deal with TikTok a bit, I will make a sign and rely on it. The following code will take the TikToker username. If there is a live video running, it will show the viewers count, so we decide that it is (live now).

I cannot parse this xml file in python

I am trying to create an API connection and response is looking like below. I need to parse this data and turn it into a pd dataframe and/or create loop to find specific information belong to tags. Below is the code i try to run but it returns with empty list, and it looks not iterable. Also it is not