/qa/ - Questions and Answers

Communication between site staff and (you)

Mode: Reply

Max message length: 4096


Max file size: 4.00 MB

Max files: 5


(used to delete files and postings)


Remember to follow the rules

(822.76 KB 514x449 Working.gif)
Tools and scripts mys_elf Board owner 06/29/2021 (Tue) 02:17:18 Id:2dfb77 No. 4
Some tools and scripts that pertain to the site. >(you) persist userscript. https://gitgud.io/mys_elf/nhnb-you-persist For when you don't like to store browser data but would like to preserve your (you)s. Not totally happy with the operation of it, but it works well enough for now. Will update at some point in the future. >Private Boards addon https://gitgud.io/mys_elf/Private-Boards An addon to require login on certain boards. >PenMod https://gitgud.io/mys_elf/PenMod The frontend for this site. Uncreative name included. >Lynxscripts https://gitgud.io/mys_elf/lynxscripts A couple of scripts contained here. archiveLimiter.py can prune the archive to a set number of threads. fileLimiter.py will prune the oldest images first to keep disk space usage within a set amount. Useful when operating on limited disk space. autoLynx.sh is a shell script to automatically set up a Lynxchan instance. Useful for setting up a testing environment. >Super simple Python scraper https://gitgud.io/mys_elf/nhnb-scraper Dumps threads into .json files, dumps images into /media/. >Thread Resumer userscript https://gitgud.io/mys_elf/nhnb-thread-resumer Remembers where you left off in a thread and places you back at that point when you return. >Dice https://gitgud.io/mys_elf/dice Adds dice to LynxChan, forked from another dice addon with few changes.
Edited last time by mys_elf on 08/07/2021 (Sat) 01:01:15.
(681.17 KB 1280x720 1269343.gif)
>>143 >liking private circlejerks
>>144 You must love miley cyrus the whore who hates privacy!! She loves to rub her crotch in front of thousands of people. She probably hates the piece of cloth between her crotch and thousands of her fans who are keen to see her private part. I'd say that the law that prohibits people to be dressed in air in public should be abolished. Imagine when nobody has to care about their privacy, what a beautiful world it may be!
>>147 >strawmanning this hard Sure thing, Juan. Go deliver your pizza somewhere else. Preferable railtracks or a busy highway.
>>114 Custom spoilers fix, replace const thumbs = document.querySelectorAll('img[src="/spoiler.png"]'); with const thumbs = [...document.querySelectorAll('img[src="/spoiler.png"]'), ...document.querySelectorAll('img[src$="/custom.spoiler"]')];
Does this site clear exifdata?
>>209 Yes.
Just came across this: https://gitgud.io/Codexx/channel_changer Appears to be a chan scraper supporting multiple softwares (including LynxChan) with the ability to import into your own LynxChan instance. I haven't tried it yet but it sure looks cool.
Tried out using the simple scraper, end up getting the following. Any ideas? Downloading 59dd2d0dc5073378dc5e65d432e1bc0ce7c3dd75455978ec622a39bbb15b9f98.png Downloading /fim/custom.spoiler Traceback (most recent call last): File "[REDACTED]\NHNB-Scraper.py", line 122, in <module> scrape() File "[REDACTED]\NHNB-Scraper.py", line 118, in scrape catalogLoader(b) File "[REDACTED]\NHNB-Scraper.py", line 29, in catalogLoader threadLoader(board, toUp) File "[REDACTED]\NHNB-Scraper.py", line 48, in threadLoader saveMedia(board, postData['files']) File "[REDACTED]\NHNB-Scraper.py", line 57, in saveMedia saveFile(board, tURL) File "[REDACTED]\NHNB-Scraper.py", line 65, in saveFile with open('NHNB/' + board + '/media/' + file.replace('/.media/', ''), 'wb') as out_file: FileNotFoundError: [Errno 2] No such file or directory: 'NHNB/fim/media//fim/custom.spoiler'
>>291 This looked a lot better, so I gave it a try. Starts to work but quickly stops because of the following. [REDACTED]\channel_changer-master>change-channel.py -s nhnb.org -b fim -o test Threads |▎⚠ | (!) 1/118 [1%] in 0.4s (2.76s (0.0 Traceback (most recent call last): File "[REDACTED]\channel_changer-master\change-channel.py", line 658, in <module> scrapeLynxchanBoard(args, json_catalog, output_root) File "[REDACTED]\channel_changer-master\change-channel.py", line 288, in scrapeLynxchanBoard for result, thread_size in results: File "[REDACTED]\Python\Python310\lib\multiprocessing\pool.py", line 870, in next raise value File "[REDACTED]\Python\Python310\lib\multiprocessing\pool.py", line 125, in worker result = (True, func(*args, **kwds)) File "[REDACTED]\channel_changer-master\change-channel.py", line 189, in scrapeThread output_html.write(html_thread) File "[REDACTED]\Python\Python310\lib\encodings\cp1252.py", line 19, in encode return codecs.charmap_encode(input,self.errors,encoding_table)[0] UnicodeEncodeError: 'charmap' codec can't encode character '\u266a' in position 18698: character maps to <undefined> Taking a short look on google about the problem, it seems like a simple unicode encoding issue with a simple fix, but I have no real experience with python to implement it properly. Would be nice to get something working so the things here can get archived.
>>408 I've pushed a fix to the repo, should work now. https://gitgud.io/mys_elf/nhnb-scraper >>409 I still haven't gotten around to testing out Channel Changer, so I can't really offer much help. I will say that it would probably be the better option if it can be made to work.