Message from @Jacob

Discord ID: 500548343282401281


2018-10-13 05:29:28 UTC  

I think I can figure this out, though

2018-10-13 05:37:34 UTC  

@ThisIsChris I'm testing out my solution right now

2018-10-13 05:37:46 UTC  

In the meantime, I have some new ideas

2018-10-13 05:38:27 UTC  

How difficult do you think it would be to add this functionality? Detect what specific immigration topic is about, and automatically suggest counterarguments from a database.

2018-10-13 05:39:27 UTC  

Maybe I could put the arguments in a list, and look for phrases like "jobs Americans won't do" and the script would immediately pop out a refutation

2018-10-13 05:39:57 UTC  

I think it would be pretty straightforward. You need a list keywords/key phrases that indicate the topic of conversation, then you just need a pre-written counter argument for each topic

2018-10-13 05:40:32 UTC  

@Jacob "Maybe I could put the arguments in a list, and look for phrases like "jobs Americans won't do" and the script would immediately pop out a refutation" yeah exactly this

2018-10-13 05:41:19 UTC  

cool

2018-10-13 05:41:32 UTC  

This is gonna get pretty advanced

2018-10-13 05:42:04 UTC  

I'll see if I can make the script automatically run once a day and send me an email with pro-immigration comments and recommended counter arguments

2018-10-13 05:42:58 UTC  

@Jacob perfect MVP to work on. I look forward to seeing it

2018-10-13 05:58:18 UTC  

@ThisIsChris What's the point of searching comment_set over comment_text?

2018-10-13 05:58:57 UTC  

it just made comment_set.intersection({set of keywords}) simpler to write

2018-10-13 05:59:13 UTC  

Does
```
if {"immigrant", "immigration"}.intersection(comment_text)
```
work?

2018-10-13 05:59:21 UTC  

would that work for plurals?

2018-10-13 05:59:35 UTC  

comment_text is a string, so no

2018-10-13 05:59:44 UTC  

intersection is for sets

2018-10-13 05:59:47 UTC  

ah

2018-10-13 05:59:57 UTC  

so I can't check for certain phrases in order?

2018-10-13 06:00:17 UTC  

You can, look at the "white people" condition as an example

2018-10-13 06:00:24 UTC  

oh that's right

2018-10-13 06:00:33 UTC  

I just can't do it as an intersection

2018-10-13 06:00:52 UTC  

right

2018-10-13 06:00:55 UTC  

so, if I want to check for one out of a list of phrases, I just have to use ```and``` a lot?

2018-10-13 06:02:01 UTC  

I mean, I have a list of phrases, and I want to see if one of those phrases is in a comment

2018-10-13 06:02:19 UTC  

that is a straightforward way, a less verbose way would be:
```python
if any(key_phrase in my_string for key_phrase in list_of_phrases)
```

2018-10-13 06:02:58 UTC  

thanks

2018-10-13 13:24:40 UTC  

what do you guys think of DuckDuckGo? I'm sick of google

2018-10-13 20:24:08 UTC  

@Deleted User at first I was hesitant to use it because its owner and founder is a "you know who" but I find DDG gives different results from Google often so it's a good other source to check out. However, if you like Google results and are just worried about privacy then you can use startpage.

2018-10-13 20:28:00 UTC  

@ThisIsChris Any idea why the script skips over some comments?

2018-10-13 20:28:14 UTC  
2018-10-13 20:28:21 UTC  

If I use this, it shows comments that the script didn't find

2018-10-13 20:32:00 UTC  

@Jacob you could be being rate limited. Instead of silently handling the JSONDecodeError try printing the error to see what's happening. One thing you can do to mitigate is add
```python
import time
time.sleep(4)
```

2018-10-13 20:32:15 UTC  

I did try that

2018-10-13 20:32:19 UTC  

Into the while loop

2018-10-13 20:32:21 UTC  

but I think it misses a lot of comments, no?

2018-10-13 20:32:39 UTC  

I did time.sleep() with .5, 1, and 2

2018-10-13 20:32:45 UTC  

Try 4

2018-10-13 20:32:52 UTC  

That's the documented rate limit

2018-10-13 20:33:04 UTC  

Wouldn't 4 seconds be enough for a lot of comments to be posted?

2018-10-13 20:33:14 UTC  

Also I think the rate limit is actually 1 request every 2 seconds