rgfewfger
This commit is contained in:
16
推特/main.py
16
推特/main.py
@@ -270,6 +270,22 @@ class Hub_Web:
|
||||
|
||||
time.sleep(15)
|
||||
|
||||
def get_urls(self):
|
||||
|
||||
tab = self.page.new_tab()
|
||||
tab.listen.start("https://x.com/i/api/graphql")
|
||||
|
||||
tab.get(url="https://x.com/i/api/graphql")
|
||||
|
||||
url_id = ""
|
||||
res = tab.listen.wait() # 等待并获取一个数据包
|
||||
for i in res.response.body["data"]['user']['result']["timeline"]['timeline']["instructions"][1]["entries"]:
|
||||
if "tweet" in i["entryId"]:
|
||||
url_id += i["sortIndex"] + ";"
|
||||
|
||||
self.xstart_info.url_id = url_id
|
||||
self.xstart_info.save()
|
||||
|
||||
def action(self):
|
||||
|
||||
self.ips_info = Ips.select().order_by(fn.Rand()).get()
|
||||
|
||||
Reference in New Issue
Block a user