From 5faea0c3e10471d142e6509499cff2f2c234aa45 Mon Sep 17 00:00:00 2001 From: BonfaceKilz Date: Thu, 17 Dec 2020 15:02:14 +0300 Subject: gn: python-twint: Patch Token class in order to get refreshTokens * gn/packages/twint.scm [patches]: Add python-twint-token.patch. * python-twint-token.patch: New file. --- gn/packages/twint.scm | 3 ++- python-twint-token.patch | 11 +++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 python-twint-token.patch diff --git a/gn/packages/twint.scm b/gn/packages/twint.scm index ae79eac..29ebd9c 100644 --- a/gn/packages/twint.scm +++ b/gn/packages/twint.scm @@ -199,7 +199,8 @@ (base32 "1bixwrwh1v7vpv0y6skgkml8zm82w00qwkvd6q79pkdj3hczha75")) (patches (search-patches "python-twint-userlist.patch" - "python-twint-mentions.patch")))) + "python-twint-mentions.patch" + "python-twint-token.patch")))) (build-system python-build-system) (arguments `(#:tests? #f diff --git a/python-twint-token.patch b/python-twint-token.patch new file mode 100644 index 0000000..570ca8b --- /dev/null +++ b/python-twint-token.patch @@ -0,0 +1,11 @@ +diff --git a/twint/token.py b/twint/token.py +index 0eeb0dc..63b637a 100644 +--- a/twint/token.py ++++ b/twint/token.py +@@ -20,0 +21,6 @@ class Token: ++ self._session.headers.update( ++ {'User-Agent': ++ ('Mozilla/5.0 ' ++ '(Windows NT 10.0;' ++ ' Win64; x64; rv:78.0)' ++ ' Gecko/20100101 Firefox/78.0')}) -- cgit v1.2.3