зеркало из
				https://github.com/viginum-datalab/twscrape.git
				synced 2025-10-30 05:26:20 +02:00 
			
		
		
		
	
		
			
				
	
	
		
			28 строки
		
	
	
		
			598 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			28 строки
		
	
	
		
			598 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| import httpx
 | |
| 
 | |
| # update this url on next run
 | |
| # url = "https://abs.twimg.com/responsive-web/client-web/api.f4ff3bfa.js"
 | |
| url = "https://abs.twimg.com/responsive-web/client-web/api.bb81931a.js"
 | |
| script = httpx.get(url).text
 | |
| 
 | |
| ops = """
 | |
| SearchTimeline
 | |
| UserByRestId
 | |
| UserByScreenName
 | |
| TweetDetail
 | |
| Followers
 | |
| Following
 | |
| Retweeters
 | |
| Favoriters
 | |
| UserTweets
 | |
| UserTweetsAndReplies
 | |
| ListLatestTweetsTimeline
 | |
| """
 | |
| 
 | |
| ops = [op.strip() for op in ops.split("\n") if op.strip()]
 | |
| 
 | |
| for x in ops:
 | |
|     idx = script.split(f'operationName:"{x}"')[0].split("queryId:")[-1]
 | |
|     idx = idx.strip('",')
 | |
|     print(f'OP_{x} = "{idx}/{x}"')
 | 
