I'm proposing here that we use a simple direct URL to the _files.xml and _meta.xml rather than the current scraping of the screen looking for the "All Files" HTML link. Although without an API neither is perfect I feel like this way is simpler and perhaps "slightly" less likely to change.

If you have a video (or audio for that matter) with video code (title) of "myvideo", then your normal download URL for files is

http://www.archive.org/download/myvideo/somefile

I also noticed that the myvideo_files.xml and myvideo_meta.xml can be found at the following URLS

http://www.archive.org/download/myvideo/myvideo_files.xml
http://www.archive.org/download/myvideo/myvideo_meta.xml

So as long as you have the video code it is a trivial matter to construct the above URLs. That is what the attached patch does.

Now I will mention that when you go to the above links archive.org does a redirect. However, the drupal_http_request (called from emfield_request_xml is designed to handle simple redirects). In my (admittedly brief) testing it appears to work fine.

CommentFileSizeAuthor
emfield-xmlurls.patch1.91 KBwinston

Comments

winston’s picture

Title: Simplify getting files and meta xml URLs » Simplify getting files and meta xml URLs for achive.org provider
winston’s picture

Title: Simplify getting files and meta xml URLs for achive.org provider » For Acrhive.org don't screen scape to get files and meta xml
Priority: Minor » Normal
Status: Needs review » Postponed

Hmm, this actually depends on...

http://drupal.org/node/165731

alex ua’s picture

Project: Embedded Media Field » Media: Archive
Component: Providers » Code

I'm moving this over to the Media:Archive queue.

winston’s picture

Status: Postponed » Active

Hmm, had tried this and had some problems. Opening it to try again.

winston’s picture

Assigned: Unassigned » winston
winston’s picture

Assigned: winston » Unassigned
Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

  • Commit 38162a5 on 6.x-2.x, 7.x-2.x by winston:
    #956694 by slerby: Fixing in 2.x version #983884 by winston: Improve...