More work on VX refactor

This commit is contained in:
Dylan
2024-05-02 17:28:44 +01:00
parent ffcc96c13e
commit 88b2461af3
8 changed files with 171 additions and 125 deletions

View File

@ -11,20 +11,22 @@ tests = {
"testNSFWTweet":"https://twitter.com/kuyacoy/status/1581185279376838657"
}
def getVNFFromLink(link):
return twitfix.getTweetData(link)
with open('generated.txt', 'w',encoding='utf-8') as f:
f.write("# autogenerated from testgen.py\n")
for test in tests:
f.write(f"{test}=\"{tests[test]}\"\n")
f.write("\n")
for test in tests:
VNF = twitfix.link_to_vnf(tests[test])
del VNF['ttl']
VNF = getVNFFromLink(tests[test])
del VNF['likes']
del VNF['rts']
del VNF['hits']
del VNF['pfp']
del VNF['uploader']
del VNF['verified']
del VNF['screen_name']
del VNF['retweets']
del VNF['replies']
del VNF['user_screen_name']
del VNF['user_name']
del VNF['user_profile_image_url']
del VNF['communityNote']
# write in a format that can be copy-pasted into a python file, i.e testTextTweet={...
f.write(f"{test}_compare={VNF}\n")