(name)
| 61 | |
| 62 | |
| 63 | def crawl(name): |
| 64 | gt = get_gt() |
| 65 | user_id = get_user_id(name, gt) |
| 66 | headers = { |
| 67 | 'authorization': 'Bearer AAAAAAAAAAAAAAAAAAAAANRILgAAAAAAnNwIzUejRCOuH5E6I8xnZz4puTs%3D1Zv7ttfk8LF81IUq16cHjhLTvJu4FA33AGWWjCpTnA', |
| 68 | 'x-guest-token': f'{gt}', |
| 69 | } |
| 70 | |
| 71 | params = ( |
| 72 | ('variables', |
| 73 | '{"userId":"%s","count":1000,"withHighlightedLabel":false,"withTweetQuoteCount":false,"includePromotedContent":false,"withTweetResult":true,"withReactions":false,"withSuperFollowsTweetFields":false,"withSuperFollowsUserFields":false,"withUserResults":false,"withClientEventToken":false,"withBirdwatchNotes":false,"withBirdwatchPivots":false,"withVoice":true}' % user_id), |
| 74 | ) |
| 75 | |
| 76 | response = requests.get('https://twitter.com/i/api/graphql/SvuhrsBPMT3klXIONc0gtQ/UserTweets', headers=headers, |
| 77 | params=params) |
| 78 | return response.json() |
| 79 | |
| 80 | |
| 81 | def parse(exec_name, data, url): |
no test coverage detected