Skip to content

Commit

Permalink
Merge pull request #101 from soxoj/twitter-cli-run
Browse files Browse the repository at this point in the history
Fixed Twitter CLI parsing
  • Loading branch information
soxoj authored Jun 21, 2021
2 parents 3dfa3f8 + 3b755ec commit 99521ab
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions socid_extractor/schemes.py
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,12 @@
'flags': ['{"data":{"'],
'regex': r'^{"data":{"user":({.+})}}$',
'extract_json': True,
'url_mutations': [
{
'from': r'https?://(www.)?twitter.com/(?P<username>[^/]+).*',
'to': 'https://twitter.com/i/api/graphql/ZRnOhhXPwue_JGILb9TNug/UserByScreenName?variables=%7B%22screen_name%22%3A%22{username}%22%2C%22withHighlightedLabel%22%3Atrue%7D',
}
],
'fields': {
'uid': lambda x: x.get('id'),
'fullname': lambda x: x.get('legacy', {}).get('name'),
Expand Down

0 comments on commit 99521ab

Please sign in to comment.