Load all favorites to the page and save it, export as JSON data or just copy the textbox contents. Works on exhentai and e-hentai.
< Feedback op Sadpanda Save/Export All Favorites
And also i'd like to know what could cause this problem or how I should find the item that errors out as null.
Perhaps the entry has been deleted by the DMCA?
First of all thanks for the bug report. For now I updated the website with the fix that you suggested.
The problem is most likely with the json parser of the "Sadpanda Save/Export All Favorites" script. I doubt its related to removed (DMCAd) galleries as those are visible on the favorites page like any other gallery.
Can you use the script to load your favorites into the page and then check the console for any getJSONfromExtendedRow error lines?
Also please update the script before doing above as I have made the error log a bit more detailed now.
ttttsdst @ protonmail.com if you don't want to share the error log publicly. It shouldn't contain anything personal though unless you have private galleries.
The site works fine now, but what puzzles me is that the script now fails all the way through the first page (50 entries) when exporting favorites.
Here is one of the error logs.
userscript.html?name=Sadpanda-Save%252FExport-All-Favorites.user.js&id=45130c6b-bd59-49f9-aae6-0d4554e08548:2201 SaveExportFavorites: getJSONfromExtendedRow error! {error: TypeError: Cannot read properties of null (reading '1')
at getJSONfromExtendedRow (chrome-exten…} {row: tr} {rowOuterHTML: '
After updating again I'm even more confused.
Now that the null is gone, for the 53 entries of favorites I exported there are now only 3 entries in the json file, now the null is not written by default is it?
Here is one of the error logs.
error
:
TypeError: Cannot read properties of null (reading '1') at getJSONfromExtendedRow (chrome-extension://dhdgffkkebhmkfjojejmpbldmpobfkfo/userscript.html?name=Sadpanda-Save%252FExport-All-Favorites.user.js&id=45130c6b-bd59-49f9-aae6-0d4554e08548:2195:121) at getThisPage (chrome-extension://dhdgffkkebhmkfjojejmpbldmpobfkfo/userscript.html?name=Sadpanda-Save%252FExport-All-Favorites.user.js&id=45130c6b-bd59-49f9-aae6-0d4554e08548:1898:29) at HTMLInputElement.getThePagesNew (chrome-extension://dhdgffkkebhmkfjojejmpbldmpobfkfo/userscript.html?name=Sadpanda-Save%252FExport-All-Favorites.user.js&id=45130c6b-bd59-49f9-aae6-0d4554e08548:1934:5)
message
:
"Cannot read properties of null (reading '1')"
stack
:
"TypeError: Cannot read properties of null (reading '1')\n at getJSONfromExtendedRow (chrome-extension://dhdgffkkebhmkfjojejmpbldmpobfkfo/userscript.html?name=Sadpanda-Save%252FExport-All-Favorites.user.js&id=45130c6b-bd59-49f9-aae6-0d4554e08548:2195:121)\n at getThisPage (chrome-extension://dhdgffkkebhmkfjojejmpbldmpobfkfo/userscript.html?name=Sadpanda-Save%252FExport-All-Favorites.user.js&id=45130c6b-bd59-49f9-aae6-0d4554e08548:1898:29)\n at HTMLInputElement.getThePagesNew (chrome-extension://dhdgffkkebhmkfjojejmpbldmpobfkfo/userscript.html?name=Sadpanda-Save%252FExport-All-Favorites.user.js&id=45130c6b-bd59-49f9-aae6-0d4554e08548:1934:5)"
I have always 50 errors of the first page.
Alright that helped a ton. I think there is a problem with the tag parser. The parser follows a strict html structure so this error might be related to an external script that modifies the favorites page so if you are using anything let me know.
And yes, I stopped the script from adding the nulls into the JSON object. Instead it now says "xxx objects in parsed JSON data" in the status panel; letting you know about any potential errors.
Can you update the script again and this time in the console right click the FULL_ERROR_LOG text and click copy object (first option). And then share the copied text with me. With this finally I should be able to find the main problem and fix it.
I can't replicate the error on my side so I need your help to fix it. Many thanks.
Alright that helped a ton. I think there is a problem with the tag parser. The parser follows a strict html structure so this error might be related to an external script that modifies the favorites page so if you are using anything let me know.
And yes, I stopped the script from adding the nulls into the JSON object. Instead it now says "xxx objects in parsed JSON data" in the status panel; letting you know about any potential errors.Can you update the script again and this time in the console right click the FULL_ERROR_LOG text and click copy object (first option). And then share the copied text with me. With this finally I should be able to find the main problem and fix it.
I can't replicate the error on my side so I need your help to fix it. Many thanks.
okay,i think it might have something to do with the localization plugin I installed.
I will have a try again.
{
"error": {},
"row": {},
"rowOuterHTML": "
"
}
{
"error": {},
"row": {},
"rowOuterHTML": ""
}
My fault.I forget that i just installed a localization plugin.
After i close it,the plugin works well now.
What plugin is it? Maybe I can make it work with the plugin as well.
What plugin is it? Maybe I can make it work with the plugin as well.
The source code on GitHub
https://github.com/EhTagTranslation/EhSyringe
and sleazyfork
https://sleazyfork.org/zh-CN/scripts/407833-ehsyringe
What plugin is it? Maybe I can make it work with the plugin as well.
The source code on GitHub
https://github.com/EhTagTranslation/EhSyringe
and sleazyfork
https://sleazyfork.org/zh-CN/scripts/407833-ehsyringe
Is adapting this script perhaps a bit tricky?
Perhaps it is not really necessary, as this need may only be useful for specific native speakers.
I'll try and let you know. It shouldn't be hard.
Also, the script now works well enough to even fetch data related to entries that have been deleted by the DMCA, and doesn't fetch null in json file as it did before. So is it possible to add a separate stats item with a separate list of deleted or privatized galleries?
Its impossible to know if a gallery is DMCA'd or removed from the favorites page. The script would have to check each and every single gallery or use the API for that information. The script only parses the favorites page and on the favorites page removed and existing galleries look exactly the same.
For now it would be quite hard to do that.
Alright I have mainly fixed the EhSyringe issue. The only problem is you need to disable the "translate timestamp" (翻译时间戳) option for the dates to be parsed correctly. With that option disabled it gives the same JSON output as the website without EhSyringe.
If that option is enabled date fields will be left as null.
Also added a relevant warning message into the status box.
The script is now compatible with EhSyringe. Including the "translate timestamp" (翻译时间戳) option.
Let me know if there are any problems.
The script is now compatible with EhSyringe. Including the "translate timestamp" (翻译时间戳) option.
Let me know if there are any problems.
Okay,it works well with the "translate timestamp" now.
Thanks!
The json file I dump has a small number of elements that are null, which always prevents me from displaying the results and throws an error when using your sadpanda-graphs.surge.sh page
Uncaught (in promise) TypeError: Cannot read properties of null (reading 'gallery_info_full')
at parseData (script.js:83:39)
at reloadCharts (script.js:40:15)
at script.js:25:13
I don't know if it's just me that's having the problem.
Add judgment after line 82 of script.js
if (row === null) {
// If gallery_info_full is null, skip this line.
continue;
}
The problem has been solved.
Thanks again for your script and page!