sviatoslav-lebediev / anki-quizlet-importer-extended

86 stars 10 forks source link

Cannot import correctly with html #192

Closed Ultraviolet-812 closed 3 months ago

Ultraviolet-812 commented 3 months ago

Hi, I encountered three types of errors within 24 hours Yesterday evening I tried uploading this quizlet (https://quizlet.com/747377979/latin-core-vocabulary-flash-cards/) from "medius" to "country" without unchecking "skip errors", but I failed with the traceback error. I tried to upload another Quizlet set completely (https://quizlet.com/925806598/latin-famous-quotes-flash-cards/) and I had the same issue, but when I checked "skip errors" it worked

Today I tried checking skip errors on the Core vocabulary quizlet again, but I encountered the Expecting value: line 1 column 1 (char 0) issue. I tried HTML: it displayed the upload complete message, but when I browsed my flashcards there is nothing in the newly created "Latin Core Vocabulary" deck.

sviatoslav-lebediev commented 3 months ago

Hi, there are a few possible issues that can happen with the add-on:

  1. The add-on can fetch text from the Quizlet but can't fetch some audio files. If you don't need audio - you can uncheck Download audio and try one more time or you can just check Skip errors and it will import items but it's possible that some audio will be missed.
  2. Sometimes Cloudflare blocks the add-on requests and in this case you will see an error immediately. You can try to switch to a mobile network if it's possible or you can try to use the HTML mode (here is a video https://vimeo.com/830860191)

If you want to 100% download your deck - use the HTML mode + check Skip errors

Ultraviolet-812 commented 3 months ago
Screen Shot 2024-07-07 at 1 17 24 AM

This is what happens when I connect to a mobile network & switch on Skip errors & switch off Download audio & enter the HTML (and btw the code is super long, even in incognito mode)

The error message is also super long:

string indices must be integers
-----------------
{"responses":[{"models":{"studiableItem":[{"id":1749680737345556,"studiableContainerType":1,"studiableContainerId":747377979,"type":2,"rank":0,"creatorId":17352068,"timestamp":1668625580,"lastModified":1668625580,"isDeleted":false,"cardSides":[{"sideId":0,"label":"word","media":[{"type":1,"plainText":"\u0101 ab abs","languageCode":"en","ttsUrl":"/v1/tts/en.mp3?v=1&b=xIEgYWIgYWJz&s=MDI2Y2Y3NTU","ttsSlowUrl":"/v1/tts/en.mp3?v=1&b=xIEgYWIgYWJz&s=MDI2Y2Y3NTU&speed=70","richText":null}],"distractors":[]},{"sideId":1,"label":"definition","media":[{"type":1,"plainText":"from, by (+abl.)","languageCode":"en","ttsUrl":"/v1/tts/en.mp3?v=1&b=ZnJvbSwgYnkgKCthYmwuKQ&s=M2UwMGJjM2U","ttsSlowUrl":"/v1/tts/en.mp3?
.......

What should I do? TYSM for your patience!

sviatoslav-lebediev commented 3 months ago

hm, strange, could you please take a look at this video, do you do it in the same way ? Maybe you didn't copy the whole HTML ?

https://github.com/sviatoslav-lebediev/anki-quizlet-importer-extended/assets/19693768/e8a0931f-bd19-4b25-b75c-acc146ecd60e

Here is your deck Latin Core Vocabulary.apkg.zip

p.s. try without start/stop phrase at the start

Ultraviolet-812 commented 3 months ago

Wait I think you're right 😂 the HTML should have ended with a </script></body></html> but mine in the image above ended with sth else. I just learned the "select all" shortcut and pasted the entire HTML onto Anki, just like you did. It works now but ignores my start and stop phrase. Thank you for guiding me through!!

sviatoslav-lebediev commented 3 months ago

sure, np, I would double-check that your phrases are correct and have or don't some spaces or something else because the comparison is strict