|
|
Get flashcards from flashcardexchange.comType:
Card Collection
Compatibility:
Mnemosyne 1.x +
Status:
Incomplete
Source:
Written by me. Description:
Simple python script to download a full set of flashcards from the site http://www.flashcardexchange.com. Simply run the script with the flashcard set number that you see in the URL of the set of cards you want. A few additional options are explained in the program's help message.
|
Does not work anymore, here's why...
Since this script was written (nearly two years ago at time of writing), flashcardexchange made some changes to their site. This script assumes that plain html tables are used in the HTML file; however, flashcardexchange now uses the YUI javascript framework to build their flashcard lists. Unless the author updates this script, it will be permanently broken.
error when executing
when i try to execute the script i get
KeyError: u'cardSetId'
does this script still work for people?
I do not know how to use the program
This program looks like it would be extremely useful however I have never used Python before and thus I am not sure how to correctly use the program. I read the read-me and the other comments but still do not know how to properly run the program. I would greatly appreciate some one explaining to me in very simple terms how to download cards successfully using this program. I have windows and python 2.6.3 installed.
Tweaks
So, I've tried this on a few of the flashcardexchange decks, and I quite like it - certainly it beats paying for downloads all hollow! But here're my suggestions to make it easier to use:
# Instead of requiring the deck ID number, why not let the parameter also be just a link? so one could go 'python getcards.py http://www.flashcardexchange.com/flashcards/view/341422' OR 'python getcards.py 341422'
# By default, dump to a file. I know of no way to take a dump to stdout and pipe it to Mnemosyne, so dumping to stdout by default is kind of useless. You always have to redirect to a file, either with the shell and <>, or explicitly with the -o option, no? So why not parse the page to get the deck name and just dump to ./deck-name.txt? (Perhaps with suitable substitutions of whitespace and capitalization - although 'About Philosophy Chapter 2.txt' would be perfectly cromulent).
Some info
On Windows, you have to specify the location of the Python interpreter. Check exactly where it is on your system, but the default is "C:\python25\python.exe", so put that before "getcards.py" and your other options and run it from a command prompt.
You need Python 2.5 for this. If you don't have it on your computer, download the latest version from python.org.
Files with images?
I tried downloading this:
C:\python25 C:\getcards.py -v -o ASL.txt 297318
and it downloaded three pages but the image for the Question was just "?" rather than the image of a person signing. Any thoughts? (I also tried using ASL.XML but that did not work either ... it created an invalid XML file.)
TOS
I made a similar script, but discovered it violated the site's terms of service, so users beware.