Compare commits
No commits in common. "master" and "Release-20201206" have entirely different histories.
master
...
Release-20
24
Pipfile.lock
generated
24
Pipfile.lock
generated
@ -18,17 +18,17 @@
|
||||
"default": {
|
||||
"certifi": {
|
||||
"hashes": [
|
||||
"sha256:2bbf76fd432960138b3ef6dda3dde0544f27cbf8546c458e60baf371917ba9ee",
|
||||
"sha256:50b1e4f8446b06f41be7dd6338db18e0990601dce795c2b1686458aa7e8fa7d8"
|
||||
"sha256:5930595817496dd21bb8dc35dad090f1c2cd0adfaf21204bf6732ca5d8ee34d3",
|
||||
"sha256:8fc0819f1f30ba15bdb34cceffb9ef04d99f420f68eb75d901e9560b8749fc41"
|
||||
],
|
||||
"version": "~> 2022.12.07"
|
||||
"version": "==2020.6.20"
|
||||
},
|
||||
"chardet": {
|
||||
"hashes": [
|
||||
"sha256:0d6f53a15db4120f2b08c94f11e7d93d2c911ee118b6b30a04ec3ee8310179fa",
|
||||
"sha256:f864054d66fd9118f2e67044ac8981a54775ec5b67aed0441892edb553d21da5"
|
||||
"sha256:84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae",
|
||||
"sha256:fc323ffcaeaed0e0a02bf4d117757b98aed530d9ed4531e3e15460124c106691"
|
||||
],
|
||||
"version": "==4.0.0"
|
||||
"version": "==3.0.4"
|
||||
},
|
||||
"idna": {
|
||||
"hashes": [
|
||||
@ -39,18 +39,18 @@
|
||||
},
|
||||
"requests": {
|
||||
"hashes": [
|
||||
"sha256:27973dd4a904a4f13b263a19c866c13b92a39ed1c964655f025f3f8d3d75b804",
|
||||
"sha256:c210084e36a42ae6b9219e00e48287def368a26d03a048ddad7bfee44f75871e"
|
||||
"sha256:b3559a131db72c33ee969480840fff4bb6dd111de7dd27c8ee1f820f4f00231b",
|
||||
"sha256:fe75cc94a9443b9246fc7049224f75604b113c36acb93f87b80ed42c44cbb898"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==2.25.1"
|
||||
"version": "==2.24.0"
|
||||
},
|
||||
"urllib3": {
|
||||
"hashes": [
|
||||
"sha256:753a0374df26658f99d826cfe40394a686d05985786d946fbe4165b5148f5a7c",
|
||||
"sha256:a7acd0977125325f516bda9735fa7142b909a8d01e8b2e4c8108d0984e6e0098"
|
||||
"sha256:8d7eaa5a82a1cac232164990f04874c594c9453ec55eef02eab885aa02fc17a2",
|
||||
"sha256:f5321fbe4bf3fefa0efd0bfe7fb14e90909eb62a48ccda331726b4319897dd5e"
|
||||
],
|
||||
"version": "==1.26.5"
|
||||
"version": "==1.25.11"
|
||||
}
|
||||
},
|
||||
"develop": {}
|
||||
|
@ -55,28 +55,24 @@ class twitter:
|
||||
# Get hashtag list
|
||||
tweet_tags = r.json()[0]['entities']['hashtags']
|
||||
hashtags = self.credentials['hashtags']
|
||||
found_not_allowed_tag = True
|
||||
print(tweet_tags)
|
||||
found_not_allowed_tag = False
|
||||
|
||||
for each in tweet_tags:
|
||||
# print(each)
|
||||
# It's a blocklist and the hashtag is found
|
||||
if self.credentials['is_blocklist'] and each['text'] in hashtags:
|
||||
found_not_allowed_tag = True
|
||||
continue
|
||||
break
|
||||
|
||||
# It is a list of allowed hashtags and the hashtag was found
|
||||
if not self.credentials['is_blocklist'] and each['text'] in hashtags:
|
||||
found_not_allowed_tag = False
|
||||
break
|
||||
|
||||
# it is a list of allowed hashtags and the hash was not fonud
|
||||
if not self.credentials['is_blocklist'] and not each['text'] in hashtags:
|
||||
if self.credentials['omit_replies'] and r.json()[0]['in_reply_to_status_id']:
|
||||
# Tweet is a reply
|
||||
found_not_allowed_tag = True
|
||||
continue
|
||||
|
||||
# Is Tweet a reply?
|
||||
if self.credentials['omit_replies'] and r.json()[0]['in_reply_to_status_id']:
|
||||
found_not_allowed_tag = True
|
||||
break
|
||||
|
||||
if found_not_allowed_tag:
|
||||
exit(0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user