Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only send mails inside firm instead of globally #1

Open
stheid opened this issue Jun 13, 2019 · 1 comment
Open

Only send mails inside firm instead of globally #1

stheid opened this issue Jun 13, 2019 · 1 comment
Labels
enhancement New feature or request

Comments

@stheid
Copy link
Owner

stheid commented Jun 13, 2019

Current behaviour:

  • jeder der an den notifications interessiert ist gibt mir ne email
  • das tool sucht alle abholslots im zeitfenster
  • jeder die resultate werden dann an alle geschickt

Suggestion:

  • pro betrieb wird geschaut ob im zeitfenster slots fehlen
  • automatisch ne nachricht über die Platform im Betrieb verschicken

Implementation ideas

https://foodsharing.de/?page=msg&cid=114510

cid can be retrieved by

re.search("\((\d+)\)",soup.select("a:contains('Nachricht ans Team')")["onclick"])[1]

The message sending on ?page=msg is a simple form submit (POST)

@stheid stheid added the enhancement New feature or request label Jun 13, 2019
@stheid
Copy link
Owner Author

stheid commented Jun 13, 2019

i dont even need the "page=msg"

s.post("https://foodsharing.de/xhrapp.php?app=msg&m=sendmsg", data={"c":cid, "b": <msgbody>})

should do the trick while s is a requests.session. The response is a nice json.

image
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant