MCPcopy Create free account
hub / github.com/LumingMelody/JS_reverse / TwitterBase

Class TwitterBase

twitter.py:61–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59
60
61class TwitterBase():
62 def __init__(self):
63 self.infos = infos
64
65 def get_headers(self, **kwargs):
66 return {
67 'x-guest-token': self.infos['guest_token'],
68 'authorization': self.infos['authorization'],
69 'authority': 'twitter.com',
70 'sec-ch-ua': '" Not;A Brand";v="99", "Google Chrome";v="97", "Chromium";v="97"',
71 'x-twitter-client-language': 'zh-cn',
72 'sec-ch-ua-mobile': '?0',
73 'content-type': 'application/json',
74 'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) '
75 'Chrome/97.0.4692.99 Safari/537.36',
76 'x-twitter-active-user': 'yes',
77 'sec-ch-ua-platform': '"Windows"',
78 'accept': '*/*',
79 'sec-fetch-site': 'same-origin',
80 'sec-fetch-mode': 'cors',
81 'sec-fetch-dest': 'empty',
82 'referer': 'https://twitter.com/'.format(kwargs['username']),
83 'accept-language': 'zh-CN,zh;q=0.9',
84 }
85
86
87class TwitterUserByScreenName(TwitterBase):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected