#๐ Help with API requests
15 messages ยท Page 1 of 1 (latest)
@broken latch
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
Morning,
Im a FED, but currently working on some python and am struggling to achieve something, I have a script running and 2 functions make API calls, however they are making multiple requests each time the script runs, burning my request limits. I'm tryna store the API call in a local json file as cache but upon running the code its not saving to json and is making multiple requests.
If you think you can help please PM me
Cheers
How is that funny
Please read this post as carefully as you can and try to do as it requests. @broken latch
!paste
If your code is too long to fit in a codeblock in Discord, you can paste your code here:
https://paste.pythondiscord.com/
After pasting your code, save it by clicking the Paste! button in the bottom left, or by pressing CTRL + S. After doing that, you will be navigated to the new paste's page. Copy the URL and post it here so others can see it.
from the code you posted i can only see you load the cache file (lines 4-6 and 8-10 are duplicated btw) and not call any function you defined. Is there more to your script?
twitter_score = get_twitter_score(twitter_handle, token_address) if twitter_handle else None
twitter_influencers = get_twitter_influencers(twitter_handle, token_address) if twitter_handle else None
i call the functions lower down in my file i havent uploading the full thing as its 600+ lines its just these 2 functions not working
on line 37 i call it here: cache = load_cache()
This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.