mirror of
https://github.com/Sneed-Group/pypush-plus-plus
synced 2024-12-23 11:22:42 -06:00
Upload files to ''
This commit is contained in:
parent
dac49e3afb
commit
f44f2f32ac
1 changed files with 29 additions and 10 deletions
33
bags.py
33
bags.py
|
@ -71,16 +71,35 @@ def ids_bag():
|
||||||
|
|
||||||
return bag
|
return bag
|
||||||
|
|
||||||
|
GRANDSLAM_BAG = None
|
||||||
|
def grandslam_bag():
|
||||||
|
global GRANDSLAM_BAG
|
||||||
|
|
||||||
|
if GRANDSLAM_BAG is not None:
|
||||||
|
return GRANDSLAM_BAG
|
||||||
|
|
||||||
|
import icloud.gsa as gsa
|
||||||
|
|
||||||
|
r = requests.get(
|
||||||
|
"https://gsa.apple.com/grandslam/GsService2/lookup", verify=False,
|
||||||
|
headers = {
|
||||||
|
# We have to provide client info so that the server knows which version of the bag to give us
|
||||||
|
"X-Mme-Client-Info": gsa.build_client(),
|
||||||
|
"User-Agent": gsa.USER_AGENT,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
if r.status_code != 200:
|
||||||
|
raise Exception("Failed to get Grandslam bag: " + r.status_code)
|
||||||
|
|
||||||
|
GRANDSLAM_BAG = plistlib.loads(r.content)
|
||||||
|
|
||||||
|
return GRANDSLAM_BAG
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
# config = get_config()
|
# config = get_config()
|
||||||
# print(config)
|
# print(config)
|
||||||
# print(apns_init_bag_2())
|
# print(apns_init_bag_2())
|
||||||
# print(apns_init_bag_2() == apns_init_bag())
|
# print(apns_init_bag_2() == apns_init_bag())
|
||||||
bag = ids_bag()
|
print(grandslam_bag())
|
||||||
for key in bag:
|
|
||||||
# print(key)
|
|
||||||
# print(bag[key])
|
|
||||||
if type(bag[key]) == str:
|
|
||||||
if "http" in bag[key]:
|
|
||||||
print(key, bag[key])
|
|
Loading…
Reference in a new issue