I'm trying to reproduce something like realtime found on Stack Exchange but only with the new Stack Overflow questions.
I searched the existing questions, but I didn't find one that specifically answers the case all tags.
I tried the following via code, but browsers don't have an option that can opening a new unfocused tab, so I had to give up (the pages would be opening over the one I'm looking at, so if I were editing one, I'd get totally lost and get in the way rather than help).
Step by step code:
- accesses the unanswered questions in the API and sorts according to the hour of publication
- checks if the question is already saved to a local csv file
- opens new questions url in a new browser tab
import feedparserfrom time import sleepimport sysimport requestsimport webbrowserfrom datetime import datetime, timeimport pandas as pdwith open('my_user_agent.txt') as f: my_user_agent = f.read()headers = {'User-Agent': my_user_agent }key = 'XXXXXXXXXXXXXXX'accessToken = 'AAAAAAAAAAAAAA'def main(): while True: repository = 'stackoverflow_rss' csv_file = f'{repository}.csv' df = pd.read_csv(csv_file) date_today = round(datetime.combine(datetime.utcnow().date(), time(0,0,0)).timestamp()) url = f"https://api.stackexchange.com/2.3/questions/no-answers?pagesize=30&fromdate={date_today}&order=desc&sort=creation&site=stackoverflow&access_token=" + accessToken +"&key=" + key response = requests.get(url, headers=headers, timeout=30).json() questions = response['items'] for question in questions: sof = question['link'] if (len(df[df['url'] == sof]) == 0) and not ('last_edit_date' in question): webbrowser.open(sof, new=0, autoraise=False) with open(f'{repository}.csv','a') as fd: fd.write(sof +'\n') for remaining in range(10, 0, -1): sys.stdout.write('\r') sys.stdout.write('Next run in {:2d} seconds'.format(remaining)) sys.stdout.flush() sleep(1) sys.stdout.write('\r ')if __name__ == '__main__': main()
Currently, I follow tags that I may be able to answer, but in my spare time I wanted to open a page open to follow in real time all the questions posted like this:
With these filters and sort,
I accessed the API and collected all existing tags, but there is a character limit in the search bar, so it doesn't accept putting all tags.
Is there a way to keep track of all tags?