Cookie Thread Act 6: Cookie & Thread

Willow has been updated, all :wowee: have been replaced with Society

5 Likes

the jokerification of willow

3 Likes

processing ends

1 Like

literally the woker

not long enough. try forever next time

1 Like

images - 2024-09-11T235816.361

3 Likes

Adding “make coding thing to break Rumble” onto my list of things that’ll never be done.

twenty years later, atlas will still have nightmares about processing

1 Like

someone give me a number between 1 and 2

2

1 Like

thanks

1 Like

i’ve been looking up surnames for the characters
i’m reading about Dutch ones right now and i swear i’ve read 5 so far out of 70 that just mean “tall”

2 Likes

that’s not between them tho

4 Likes

2 Likes

this is what i look like irl

4 Likes

ok I tried to make the web scraper with help from Claude but it’s not actually scraping right, I suspect but am not sure that the issue is that something about the link-finder isn’t working right, but I’m not positive

and I ran out of free messages for the next few hours so I can’t ask

code (the indents didn't paste right but they aren't the issue)

import requests
from bs4 import BeautifulSoup
import re

def get_thread_links(sub_board_url):
response = requests.get(sub_board_url)
soup = BeautifulSoup(response.text, ‘html.parser’)
# Find all tags with class ‘post-subject’
thread_links = soup.select(‘a.post-subject’)
return [‘
https://glowfic.com’ + link[‘href’] for link in thread_links]

def get_word_count(thread_url):
stats_url = thread_url + ‘/stats’
response = requests.get(stats_url)
soup = BeautifulSoup(response.text, ‘html.parser’)
# Find the element containing “Word Count”
word_count_row = soup.find(‘td’, string=‘Word Count’)
if word_count_row:
# Get the next element which contains the actual count
word_count = word_count_row.find_next(‘td’).text
return int(word_count.replace(’,’, ‘’))
return 0

def main():
sub_board_url = ‘The Chelish Constitutional Convention | Glowfic Constellation
total_word_count = 0

thread_links = get_thread_links(sub_board_url)
for thread_link in thread_links:
    word_count = get_word_count(thread_link)
    total_word_count += word_count
    print(f"Processed thread: {thread_link}, Word count: {word_count}")
    time.sleep(1)

print(f"Total word count for the sub-board: {total_word_count}")

if name == “main”:
main()

Claude?

Also this formatting is hellish lol

Are the thread links correct in the output? Is it throwing an error somewhere? What precisely is the issue?

- ok so, I thought someone had suggested I ask ChatGPT, but I think in hindsight that was because I conflated “Litten using ChatGPT” with “it being a good idea to do this”

Claude is like ChatGPT but sometimes marginally better at saying things that are true, which is not to say that this program is necessarily… even slightly accurate… considering everything about LLMs

(it did tell me to use real libraries and give me a program that spat out a real result, but it was a useless/definitely wrong result, it thinks there are zero words in the threads on this subboard which is clearly false)

1 Like