File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 9
9
r = requests .get (URL )
10
10
11
11
if r .status_code == 401 :
12
- print ("login [%s] or password [%s] is incorrect\n %s" % (username , password , 'Error' ))
12
+ print ("login [%s] or password [%s] is incorrect\n %s" % (username , password , 'Error' ))
13
13
elif r .status_code != 200 :
14
14
print ("Requests error [%s] - %s" % (r .status_code , URL ))
15
15
elif r .status_code == 200 :
21
21
key_words2 = re .findall ('Stop these mails' , text )
22
22
keys = key_words1 + key_words2
23
23
urls = re .findall (r'''(?:(?:https?|ftp):\/\/)?[\w/\-?=%.]+\.[\w/\-&?=%.]+''' , text )
24
- if len (keys ) > 0 and len (urls )> 0 :
24
+ if len (keys ) > 0 and len (urls ) > 0 :
25
25
print (a ['feed' ]['entry' ][k ]['title' ])
26
26
print (a ['feed' ]['entry' ][k ]['summary' ][0 :50 ])
27
27
print (a ['feed' ]['entry' ][k ]['author' ]['email' ])
You can’t perform that action at this time.
0 commit comments