Python Forum
How to use data from an API, to create an alert?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to use data from an API, to create an alert?
#3
Do I understand correctly that you want to find something?

import requests
import json

response = requests.get('https://a.4cdn.org/biz/catalog.json')
catalog = json.loads(response.text)

print(catalog[0]['threads'][0].keys())

length = len(catalog)

the_name = "Anonymous"

for x in range(length - 1):
    my_range = 10
    for a in range(my_range):
        name = catalog[x]['threads'][a]['name']
        if name:
            if name == the_name:
                print("found", the_name, "at", a, x)
Reply


Messages In This Thread
RE: How to use data from an API, to create an alert? - by Axel_Erfurt - Apr-20-2021, 09:20 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Monitor specific line of code and get alert Olimpiarob 0 1,493 Jul-08-2020, 10:06 AM
Last Post: Olimpiarob
  Python / Selenium Turning Off Alert graham23s 3 8,178 Aug-18-2019, 02:12 PM
Last Post: metulburr
  Issue closing an Modal Alert (popup) leviathan54 8 5,822 Apr-23-2019, 02:00 PM
Last Post: leviathan54

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020