aboutsummaryrefslogtreecommitdiff
path: root/python-twint-mentions.patch
diff options
context:
space:
mode:
authorBonfaceKilz2020-11-10 01:04:37 +0300
committerBonfaceKilz2020-11-10 02:01:08 +0300
commit2efe8a26f0a6a852dff073a8cf2694a9bbffbb89 (patch)
tree7f16c10eb643eddcc4876bb7003c5b1251ddcf34 /python-twint-mentions.patch
parent9cb0d9e3c5662198d5a0f9656c43ec4fefb9b5bc (diff)
downloadguix-bioinformatics-2efe8a26f0a6a852dff073a8cf2694a9bbffbb89.tar.gz
gn: python-twint: Patch twint to fix some bugs
* gn/packages/twint.scm (python-twint): [patches]: Add 2 new patches. [arguments]: Rename 'cast-variables-properly to 'twint-hot-fixes. * python-twint-mentions.patch: New file. * python-twint-userlist.patch: New file. See: https://github.com/twintproject/twint/issues/1012
Diffstat (limited to 'python-twint-mentions.patch')
-rw-r--r--python-twint-mentions.patch16
1 files changed, 16 insertions, 0 deletions
diff --git a/python-twint-mentions.patch b/python-twint-mentions.patch
new file mode 100644
index 0000000..f792786
--- /dev/null
+++ b/python-twint-mentions.patch
@@ -0,0 +1,16 @@
+diff --git a/twint/format.py b/twint/format.py
+index 334b43a..3eeb8c2 100644
+--- a/twint/format.py
++++ b/twint/format.py
+@@ -29,7 +29,10 @@ def Tweet(config, t):
+ output = output.replace("{quote_url}", t.quote_url)
+ output = output.replace("{near}", t.near)
+ output = output.replace("{geo}", t.geo)
+- output = output.replace("{mentions}", ",".join(t.mentions))
++ output = output.replace("{mentions}",
++ ",".join(map(lambda x: x.get("screen_name",
++ None),
++ t.mentions)))
+ output = output.replace("{translate}", t.translate)
+ output = output.replace("{trans_src}", t.trans_src)
+ output = output.replace("{trans_dest}", t.trans_dest)