I want make a quick search for phpBB forums websites one of them is www.cracked.to when I search on it, it generate a new SID for each search result so the simple of putting {query} isnt the option, I was wondering if I can pass it through python:
I tried this on windows terminal, its working, but I am not sure pass how to pass it on web browser through Alfred. Here is the script:
import requests
import sys
query = sys.argv[1]
payload = {'action': 'do_search', 'keywords' : query, 'postthread' :'2', 'matchusername' : '1', 'forums[]': 'all', 'findthreadst':'1', 'numreplies':'', 'postdate':'0', 'pddir':'1', 'threadprefix[]': 'any', 'sortby':'lastpost', 'sortordr':'desc', 'showresults':'threads', 'submit':'Search'}
if len(query) > 0:
r = requests.post('https://cracked.to/search.php', data=payload)
print(r.cookies)
print(r.url)
Here is the workflow: https://d.pr/f/vEVw9K
Any ideas?