Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: ipsw download ota --beta --pattern PATTERN (using theiphonewiki.com) #75

Closed
glen-mac opened this issue Feb 10, 2022 · 13 comments

Comments

@glen-mac
Copy link

Hi! Have a small feature request. Similar to

$ ipsw download beta <build>

It would be awesome to be able to download Beta OTAs using links on the iphonewiki.com. On top of that being able to specify a pattern similar to the command:

$ ipsw download -d iPhone14,2 --latest --pattern iBoot

Would be such an awesome addition.

@blacktop
Copy link
Owner

blacktop commented Feb 10, 2022

Is there a reason why you want to download OTAs from theiphonewiki and not just from apple?

@glen-mac
Copy link
Author

iiuc apple will remove the links from their xml listings for OTA betas as they do for IPSW betas - this is to download older versions that are no longer signed

@blacktop
Copy link
Owner

Hey so I took another look at the iphonewiki and it is VERY complex and I'm not really sure how to proceed.

For starters crawling their tables is a nightmare because there is 0 standardization and I EVEN am using the API now and not just scraping and it is still VERY gross to work with.

Also OTAs don't really lend themselves to being "categorized" let me show you what I mean - https://www.theiphonewiki.com/wiki/OTA_Updates/iPhone/15.0

How would you query those OTA zips? ipsw download wiki --version 15.0 --prereqver 14.0.1 --ota --device iPhone8,1 --board N71AP ???

I guess typically peeps would want the n/a n/a version of OTAs?

So it's parsing HTML tables with random spans everywhere OR parsing wikitable markup with random spans everywhere.

🤮

@blacktop
Copy link
Owner

It looks like the ipsw.me dude has old OTAs, maybe I could add support for those?

@blacktop
Copy link
Owner

I guess you were interested in BETA OTAs right? Which ipsw.me doesn't have 🤔

@blacktop
Copy link
Owner

This kinda makes me want to build my own version of ipsw.me 😬

@glen-mac
Copy link
Author

heh yeah it looks disgusting to scrape

re: the deltas the n/a prerequisite is really the only one of interest

i’m surprised that ipsw.me doesn’t catalogue these, must really only have importance to researchers.

@glen-mac
Copy link
Author

This just came to my attention if it is of any help in parsing.

https://www.theiphonewiki.com/w/index.php?title=Beta_Firmware/iPhone/14.x&action=raw

Noting the “raw” formatting.

@blacktop
Copy link
Owner

Yeah that is the format I'm consuming when I was talking to the API, I believe that is MediaWiki MarkUp format. However, it turned out to be almost equally annoying to work with due to the rowspan="5" I understand why the wiki authors do it, but it makes auto-parsing very difficult. You can see my initial attempts here - https://github.com/blacktop/ipsw/blob/master/internal/download/iphonewiki.go#L200

I'm not saying it's impossible, just that it is equally difficult due to having to keep track of the spans and then "repeating" the fields above to the following, what I'm calling, WikiIPSWs.

@blacktop
Copy link
Owner

blacktop commented Mar 7, 2022

FYI @glen-mac I added --pattern to the ipsw download ota cmd

@glen-mac
Copy link
Author

glen-mac commented Mar 8, 2022

ah lovely, thanks!

@zcutlip
Copy link

zcutlip commented Jan 30, 2023

lol wish I'd seen this sooner. I actually did exactly this: I scrape the iPhone wiki, and I publish ipsw.me v2 compatible JSON at https://ipsw.inode.link/ipsw-beta.json, so you can grab full, non-OTA IPSWs.

Unfortunately the person who updates the wiki hasn't updated it since September, so my JSON feed isn't up to date either. :-(

@blacktop
Copy link
Owner

revamped the ipsw download wiki --ota --beta cmd to also allow you to filter by --pv prerequisite version and --pb prerequisite build (--pattern should still work) in latest release pushing out now (also it now parses the MediaWiki Markdown format exposed by the API

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants