Message from @Jacob
Discord ID: 500821811450347521
yep that's it. I forget if you put in email address or just username, try both
@Jacob I checked, username should be the full email-address, the port should be 25, the host is smtp.gmail.com
thanks
this example uses 587 as the port
maybe I'll try both
@ThisIsChris
```
smtplib.SMTPNotSupportedError: SMTP AUTH extension not supported by server.
```
I checked "allow less secure apps"
Thanks
okay I got the email server to send out emails
just test emails so far, but we're making progress
yeah sounds awesome!
my next step should be to figure out a way to accumulate a list of posts, and send out an email once it reaches a certain threshold
right now it just spams me every time it finds a comment lol
So, this is the idea I have so far:
> Automate the script to start up once a day
> Scan Reddit for pro-immigration comments until it reaches a certain threshold
> Send out an email with all the comments plus recommended counterarguments for me to copy paste
> Script automatically shuts down after sending out the email to be restarted the next day at a set time
Once this program is finished, it's going to be peak weaponized autism
that's great!
the emails don't send if they have a link in them
```
for comment in interesting_comments(request.json()):
if comment not in printed:
print('')
#on some computers printing \a is an escape
#sequence that produces a ding sound
print('\a\a\a', flush=True)
#for interesting comments found
#print out a link
#print out the subreddit it was found in
#print out what the comment says
message = comment['permalink'] \
+ '\n' \
+ '\n' \
+ comment['body']
server.sendmail("[email protected]", "email censored pls no dox", message)
server.sendmail("[email protected]", "email censored pls no dox", message)
printed.append(comment)
```
sends fine
```
for comment in interesting_comments(request.json()):
if comment not in printed:
print('')
#on some computers printing \a is an escape
#sequence that produces a ding sound
print('\a\a\a', flush=True)
#for interesting comments found
#print out a link
#print out the subreddit it was found in
#print out what the comment says
message = "Reddit.com" + comment['permalink'] \
+ '\n' \
+ '\n' \
+ comment['body']
server.sendmail("[email protected]", "email censored pls no dox", message)
server.sendmail("[email protected]", "email censored pls no dox", message)
printed.append(comment)
```
no longer sends
I don't think this library has email subjects
it's the really basic one
@ThisIsChris perhaps we have some Python experts in IE who could help with this project?
<@&435155896780324864> Is anyone here a Python expert?
@Jacob An expert is not going to know the answer to every question about every library off the top of their head, but a lot of these questions can be answered by googling and checking the documentation or stack overflow which are usually the first results.
good point
now I feel like one of those boomers that asks their grandkids how to close a dialog box
:boomer:
@ThisIsChris I have a big 4 hour programming test this week, so I'm gonna be preparing for that and should probably put my work on this script on hold for a few days
@Jacob good luck on your exam!
thanks!
```java
/**
*
* Implement the private reverse(ListNode node) method using recursion.
* You are allowed to add helper method into this class if needed.
* @param node -- the reference of the first data node(successor of the dummy) in the original list.
* @return A new MyLinkedList object contains the same set of data items, but in a reversed order.
*/
private MyLinkedList reverse(ListNode node) {
MyLinkedList reversed = new MyLinkedList();
ListNode curr = node;
ListNode lastNode = null;
while (curr != null) {
lastNode = curr;
curr = curr.next;
}
reversed.head.next = lastNode;
if (node.next != null) {
reversed.head.next.next = reverse(node.next).head.next;
}
return reversed; // change this line of code as needed
}
```
Does anyone see anything wrong with this code?
```java
/**
* This method reverse2() will reverse all data nodes in this list, WITHOUT
* creating(introducing) new list nodes, by simply re-wiring the next reference in
* the existing list node. For example, list1 = []—>[A]—>[B],
* the reversed list1 will be []-->[B]-->[A],
* after assigning node A to B's next reference and setting A's next to null.
*
*/
public void reverse2() {
if(this.size <= 1)
return;
// The following method call works on a *sublist* without a Dummy Node.
// Namely, we preserved the OLD dummy head node in the reversed list.
this.head.next = reverse(this.head.next, this.head.next.next);
}
/**
* Please implement the helper method below for reverse2().
* @param first, the first node of the list to be reversed.
* @param second, the second node of the list to be reversed.
* @return the new head node of the reversed list.
* Note: you are NOT allowed to create new list node, but have to
* re-wiring the existing nodes by changing their next references.
* Write this method using recursion.
*/
private ListNode reverse(ListNode first, ListNode second) {
ListNode curr = first;
ListNode newFirstNode = null;
ListNode newLastNode = null;
ListNode newHead = new ListNode();
while (curr.next != null) {
newLastNode = curr;
newFirstNode = curr.next;
curr = curr.next.next;
}
newHead.next = newFirstNode;
newLastNode.next = null;
newFirstNode.next = reverse(newFirstNode.next, newFirstNode.next.next);
return newHead; //change this line of code as needed.
}
```
and this ^