1

Note: There is something in the title to test this tool.

About: (required)

This searches for spam on a given site and places the links in an MD file.

Screenshot / Code Snippet: (highly recommended)

# Imports not included

def get_spam(site: str = "stackoverflow") -> str:
  true = True
  false = False
  json = eval(requests.get(f"https://api.stackexchange.com/2.3/questions?page=1&pagesize=30&order=desc&sort=creation&site={site}&filter=!Fc6b9*tI0e7rqpMIoRUAgp8tJ8").text)['items']
  spam = [x for x in json if re.search(r'(?:\d-*){10}', x['link'])]
  return '\n'.join(x['link'] for x in spam)

Download / Install: (required)

Fork or clone this repo, change sitename.txt to the desired site and run the workflow. It will also be run when current_minute % 5 == 4. To stop this, you can comment out the schedule: and - cron: lines.

Platform: (recommended)

Works on GitHub.

Contact: (optional)

Just me. Open a discussion if you want to contact me. Note that discussions are public.

License: (optional)

Not under a license yet.

Code: (recommended)

Just used the requests module in Python to query from the API. You can contribute by forking and opening a pull request.

3
  • 1
    SmokeDetector usually handles these as well as many other patterns for spam. Commented Aug 4, 2023 at 10:20
  • It baffles me why SE code itself does not detect phone numbers and flag them as suspected spam, only visible in review queues. Do I need to install python to run it ? Commented Aug 5, 2023 at 1:55
  • @RohitGupta GitHub actions should install it for you. I just fixed a bug a few minutes ago, so try running the action again. Commented Aug 5, 2023 at 9:14

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.