I would like to use Qualtrics to get ratings for over 700 images (i.e., participants will have to indicate how negative or positive they find them). The question will be exactly the same for each image, yet there seems to be no straightforward way to just create the question once and then loop over all the images I want participants to rate. Obviously, I don't really want to write the same question 700 times.
I found a relevant answer here on Stack Overflow that seems to suggest a good solution - here it is: Randomization in Qualtrics using Photos or Graphics and Loop and Merge . My question, however, is not a mere duplicate of this, as I have troubles running the web scraping code at the bottom (I am a very inexperienced coder with limited Python knowledge), thus have some follow-up questions.
I tried running the above mentioned code a number of different ways (I have BeautifulSoup and Selenium):
1) create a .py file (e.g., getURL.py) with all the code suggested, and then just run it from the PowerShell (the only way I know how to run python code) with
python getURL.py
This opens up a Chrome browser (data:,), but the file it creates in the end is empty. I'm guessing by the time I navigate to the library the code has already run and reached the end of the for loop.
2) I tried running it line by line in the Python interpreter in the PowerShell, like this: I would go through the first block, that would bring up the Browser, then I'd navigate to the photo library within the browser (am I supposed to do anything other than just brining up the site in the browser?). Once that's done I'd move on to the next block of code with the for loop - I'd paste it into the interpreter, either as a block or line by line - but python just doesn't seem to execute that.
Could anyone tell me how to run that code?
ALTERNATIVELY: does anyone know an easier way a) to get Qualtrics to loop over images, or b) to get a list of 700 URLs quickly?
Thank you very much for the help.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…