Apr-20-2021, 07:58 PM
UPDATE:
found a good video that explained lists and dictionaries quite well here
this is where I'm at so far.
found a good video that explained lists and dictionaries quite well here
this is where I'm at so far.
import requests import json def search(threads, lookup1): number = ['no'] for k, v in threads.items(): try: if lookup1 in v: return number except: continue response = requests.get('https://a.4cdn.org/biz/catalog.json') catalog = json.loads(response.text) for page in catalog: thread = page['threads'] for threads in thread: search(threads, 'DOGE')the function I've added is mostly guess work at this point, but i've managed to loop through the list of pages and I can print each individual "thread" dict now. I'm using 'DOGE' as an example keyword as mine are hardly ever mentioned, but still no luck actually returning any data.