#⌨coders-cave

1 messages · Page 107 of 1

hollow bronze
#

and sometimes writing portions in a caffeine high and being utterly confused by it later

#

maybe sometimes are all the time

#

depends on the person

next lotus
#

how does that give joy lmao

hollow bronze
#

the art of sarcasm

foggy beacon
#

the art of no motivation!

barren shale
#

the art of if you rely on motivation you will never get anything done

hoary hound
#

I've learned that waiting for motivation and inspiration is a shitty strategy and the only way to get stuff done is to just do it, even if you don't feel like it

hoary hound
main brook
wary lodge
#

always put comments bro

next lotus
#

ok

sharp wing
sharp wing
tiny isle
#

how do I program my 2D character to move?

#

It was a joke xD

errant trail
#

so far i am not confused on any of my code (but sometimes i forgot what it does exactly)

i am good at organization

#

it runs

#

it gets the code for the event that the args specified from the source code (for the build)

it will check if the event exists (if it doesnt exist, return -1)

then it gets the parameters of the build and overwrites it with an argument (optional)

then it returns the result of the code

errant trail
#

😊

tiny isle
#

XDDDD

errant trail
next lotus
tame pier
#

Hey yall

#

Did anyone of you try dreams

#

If you did is it good

next lotus
#

ps4 dreams?

median vault
#

hello fellow coders

merry prism
#

Anyone here?

hasty cobalt
#

how tf do i turn a map file into a json and back?

#

mobile btw

elder warren
#

excuse me, could someone please direct me to the world-size mod?

main brook
main brook
hasty cobalt
distant wraith
next lotus
#

oh its not lol

next lotus
#

just tried C and wtf

#

why do you have to explicitly put the types like dude

#

you have to put struct or enum to declare a var that is struct or enum

glossy flicker
#

That's helpful to use some times @next lotus

wet girder
next lotus
#

but why do you have to explicitly type it tho

#

in java and c# we'd just have to languages language = English;

wet girder
#

hmm fair

next lotus
#

just found this gem

hollow bronze
#

just incase you need a bible's worth of comments in your loop

wet girder
#

lmao

#

I thought comments were just ignored by the compiler

tame pier
main brook
#

really educational game

potent dagger
#

hm.. map.wbox encrypted? ihope its readable i coding a preview map app

potent dagger
#

thats cool... but i just loaded .wbax i cant understand .wbox :(

#

it seems stripped

main brook
#

i can't understand

#

which part

#

in the channel topic

#

do you not understand

wet girder
#

@bitter sedge has ~decode and ~encode commands for it

#

but I can also explain how to decrypt it

main brook
#

Jupe please don't

#

not here

#

😭

wet girder
#

:)

#

it's programming related tho

potent dagger
main brook
#

YEAH BUT LIKE

#

its wbox

#

unless its just

#

encrypting decrypting

#

BUT I DOUBT

#

THAT'S GONNA HAPPEN

wet girder
#

Well anyway. Working at the office without headphones is impossible

#

would not recommend

#

I think I am just gonna end work day for today and go to the gym lol

main brook
#

why do that anyway

#

woah jupe

#

i didn't know you go to the gym

wet girder
main brook
#

lmao

#

well i can't code in peace without my earphone

#

and my class is pretty loud

wet girder
#

me neither

#

I need headphones and some banger music to be able to produce code

main brook
#

indeed

wet girder
#

yeah, I'mma just head to the gym and work home a bit if I don't feel dead

main brook
#

you died jupe

#

now go home

barren shale
wet girder
#

fair

orchid frigate
#

Im the exact opposite

#

I cant code in peace

#

I get bored

#

Instead I turn on the loudest music possible and get drunk

#

Either on alcohol or caffeine

#

And two hours later forget what I did so I redo everything again

#

👍

knotty root
tidal elbow
#

tfw rust analyzer is doing the worst job at getting types

tidal elbow
#

we just had beers and coded tipsy

#

did we get work done? not really

blazing crown
#

R.I.P powerbox

main brook
#

im thinking about making a chat app, what db should i use

#

i was thinking like discord with mongodb

#

or should i use postgresql

next lotus
#

much better if store the messages in a dynamic array in the server you can get and stores messages from there

#

if you want to save the chat history in intervals then sure you can use a db for that

main brook
#

i never said i was gonna use it for realtime

next lotus
main brook
#

i literally just mean

#

storing the message

next lotus
#

oh but you didnt say you wont either

main brook
#

im using websocket idiot

#

smh

#

the only time it'll be accessing the db is

#

a new message which happens once

#

secondly

#

a message fetch api

#

the messages are queued

#

to be written

next lotus
#

that still sounds realtime

main brook
#

it is but im not like

#

fetching the db

#

every 0.5s

#

just once for loading up channel message

#

and the rest is ws

#

its even cached

#

like

#

the queue itself

#

smh

#

imagine having

#

1 time

#

message

#

where if you refresh

#

your history gone

#

not my goal

#

darn my internet being shit

#

imagine having an exam online but you're also required to be in class and your signal is shit in here

wet girder
#

I don't think I made it efficiently

main brook
#

same

main brook
#

i made like

#

every 0.25s

#

it would do

#

a request

#

with the old XML thingy

#

lmao

#

it was very inefficient

rose pawn
#

Hello coding experts

#

I am here to propose you a problem I have been having with python

#

It involves the library of pillow

#

And web scraping

#

My problem is

#

I am trying to make a code that takes the raw image data of a gif from a website, then it gets a text from the header. But I have been unsuccessful

#

If anyone is willing to help me resolve my problem I could provide more details

orchid frigate
#
  1. You needn't need to talk in such a fancy manner this is discord no matter coders or not we are all idiots
  2. Sure I don't have any experience in python so I cant do much but im sure pretty much anyone else here can help
rose pawn
#

Stack overflow also didn't help

#

Pls I'm desperate

#

I was hopeful that there would be some lifeless coder here to help me

#

@devs

#

Devs help me pls help me

#

Daddy mastef pls wbsuffer

#

Pretty pls

knotty root
#

🤣

wet girder
#

it's kinda hard to tell anything when I don't know shit what's wrong

#

I know the technologies used

#

so I can try helping

#

but not with the current information

knotty root
#

+1

rose pawn
#

Step two: code gets the source code of the gif in the website

#

Step three: code opens the source as raw image data

#

Step four: code takes a specific text of data from the header except it doesn't do that bcs I suck at python

#

I will provide the actual code shortly

#

Here is the question I asked on stack overflow

#

With far many information

rose pawn
#

The stack overflow post has all the things I mentioned in it already so you can just read it first

#

Read the comments too

#

And thank you

wet girder
#

I still don't understand

#

what are trying to get the date out of

#

page header?

main brook
#

@rose pawn

#

are you trying to get Headers data?

#

btw

#

when you open

#

it returns

#

an image/gif

#

no idea why you would like

#

read its content bytes to a BeautifulSoup

main brook
#

you can just like

floral sedge
#

Press control shift QQ on Chromebook

main brook
#

why

floral sedge
#

Because it's the most amazing thing ever

main brook
#

yeah but like

#

what does it do

hollow bronze
#

pretty sure that just closes the tabs

#

which is just a keyboard shortcut

#

for chrome

iron finch
#

If you press it twice, it shuts down your computer!

hollow bronze
#

glad they made a shortcut for that, be a shame if there was a button made for that

nova wedge
#

lmao

rose pawn
#

Oh wow

rose pawn
#

Thanamks

rose pawn
quasi mauve
#

this should be coders cove

#

not coders cave

next lotus
#

we're all cavemen here

rose pawn
# main brook

So I can get the header without even getting the src first?

#

Tho I think the date there isn't the date in the header of the gif

#

It's date you have opened the site?

#

What I am trying to do is get the date from the header of the gif in the site

#

The date in the header of src file is the date gif was published

next lotus
#

isnt it in Last-Modified

main brook
#

i think that's for something else

#

you wanna get the GIF creation date?

#

doesn't GIF contain that in its metadata

rose pawn
#

Yeah I think

#

I'm a bit confused

#

Which is the gif creation date there?

#

How do I get the metadata then?

orchid frigate
#

I just had an idea for a game thats so good

#

it might make me relearn game development

crimson pelican
#

What is it?

orchid frigate
#

geometry dash

#

but your icon kinda follows where your cursor is

crimson pelican
#

Ooh

orchid frigate
#

it would make for a great rythm game

crimson pelican
#

Interesting

orchid frigate
#

plus its relatively easy to make

#

In fact its so simple to make I might not even use a game engine

#

but roll with just a graphics API

crimson pelican
#

Wow

orchid frigate
#

extra performance which is important a

#

and some cutimisability

#

fuck spelling that word

#

how do you do it

#

custi...

crimson pelican
#

Costimise

#

Oh no

#

That's not it...

orchid frigate
#

costimisability

#

no

crimson pelican
#

Customisability?

orchid frigate
#

custom

#

Customisability

crimson pelican
#

Yeah

orchid frigate
#

no the autocorrect says its wrong

#

well either way

#

this is gonna be fun

#

even if I dont make it into a real game

crimson pelican
#

Ok good luck

orchid frigate
#

its gonna be fun to play it myself

orchid frigate
#

custamisability

#

fuck thats not it either

main brook
rose pawn
rose pawn
#

I figured out how to take the "last modified" date

#

Which almost solves my problem but

#

If the gif has been updated since it was first published

#

Then the last modified date changes

#

Which is a problem bcz I'm trying to get the date it was first published

#

Which is actually in the raw image files of the gif

#

You can access the files by inspecting the source page

#

Press ctrl r and search "date" and you should find date:modified

#

The real published date is somewhere around there

#

Thanks rei for your help so far

#

Guys help mi

#

Rei help mi rei

#

Rei where are yu

barren shale
#

if you're not finding anything on google

#

then you dont know how to google

hollow bronze
#

i think rei answered how to get the date on it though

#

already

#

unless whatever rei posted was different from what they're looking for

wraith carbon
#

A

rose pawn
#

Why do you think I am looking for answers in worldbox God simulator discord server

#

Because I couldn't find help anywhere else

#

I would ask more questions on stack overflow but becthes kept downvoting me

rose pawn
main brook
#

its lie

#

like

#

3am for me

#

rn

rose pawn
#

You gon give me wisdom?

#

If not good night

main brook
#

good night your butt

#

its dawn already

#

im awake now

#

also

rose pawn
#

Ok good morning

main brook
#

does the website have like

#

"published at"

#

in its document

#

if so you can just scrap that

rose pawn
#

No I checked those

#

It only has it in the src file

main brook
#

then no way to know

rose pawn
#

But it exists

main brook
#

the file only contains data like

rose pawn
#

I just need to take it somehow

main brook
#

when is the file uploaded

#

or when the file is created

#

not the initial post

#

date

tall schooner
#

Sus

rose pawn
#

It's the same thing as the date in the src takes the place of the date seen in the website

#

In the src file you can find the un modified date

#

That's the real date

main brook
#

isn't the Date header supposed to mean your current time

#

like when you're making that request

rose pawn
#

You can also find the last updated date

#

And if the website has never been updated it gives you the publish date

#

The problem is some sites have been updated

#

But if you go the src link

#

You inspect the page

#

You open the file of the page

#

You press ctrl r

#

You search "date"

#

You can find the real date in line 1

#

That's what I am trying to get all along

#

Rei you there?

#

Rei?

#

Rei slept wbsrsly

#

Good night rei

main brook
#

no

#

im literally gone for like 4 minutes

rose pawn
#

Ok did you check the file

main brook
#

give me the screenshot

rose pawn
#

I cant I'm on mobile

#

Inspect and press ctrl r

main brook
#

im also on mobile

rose pawn
#

Ok wait

#

This thing

#

Xmap?

main brook
#

which part

#

is that from

#

i said screenshot

#

not a text

rose pawn
#

I cant do that today

main brook
#

why not

#

literally can just screenshot

rose pawn
#

Too late for me too

#

My laptop is a potato

#

Will take too long to turn on

main brook
#

when i asked for a screenshot suddenly you have alot of excuses

#

but

#

can't help

#

i don't know which part is that from

rose pawn
#

Well I also gotta figure out how to screenshot

#

Because my laptop is potoaot

#

What do you mean which part

rose pawn
#

There is only one file you can open when you inspect it

#

Theekslalaeso

#

Look rei

main brook
#

oh found it

rose pawn
#

Oh cool

main brook
#

@rose pawn

#

its unethical

#

but works

#

i think i could've used

#

r.text.split() instead

#

but regex was the second thing came to my mind

#

so

rose pawn
#

Wow thanks for your help rei

#

So what did you do

main brook
#

i just

#

splitted the string into 3 parts

#

it'll split when it encounters a "CreateDate"

#

so i just get the middle of the splitted string

#

and then remove unwanted stuff

#

since the request text returns gibberish

#

and can't be parsed by bs4

rose pawn
#

Hmmm I totally understand

#

I will try it

#

Thanks for your efforts

#

Good night

main brook
#

it's dawn

rose pawn
#

Good dawn

timid field
#

Hello my fellow coders

#

Hows stackoverflow going

hollow bronze
#

Idk I only use it to steal code

vital otter
#

use it as a "reference"

main brook
#

no i actually use it as reference

#

i don't copy paste from stack overflow

hasty bane
#

steal now, use stolen code as reference later

main brook
#

e

#

not really

#

i just use it as actual reference

#

its hard to copy paste from SO in mobile

#

so ive grown the habits of just using as reference

warped monolith
#

any documentary on how to make mod using NCMS?

distant wraith
barren shale
warped monolith
barren shale
#

nikon stopped working on it

warped monolith
#

oh so

#

I should only like

#

using the built-in mods folder of worldbox?

barren shale
#

you should do what people tell you there

#

not here

wet girder
barren shale
#

that's nice

warped monolith
warped monolith
main brook
#

@warped monolith next time

barren shale
wet girder
#

how about mega modding

#

full stack web development hidethepain

main brook
#

👍

wet girder
#

I have 2 weeks left of like unpaid work that's just for my school, then I have 2 weeks of and I have paid work for a month at the same company. They'll probably want to take me for even longer though

#

so I'll be doing full stack web development for some time

crimson pelican
#

Good luckaye

hasty bane
#

nice

main brook
#

are you lost?

limpid mantle
#

Do you mind if I ask this question here?

main brook
#

just ask

#

don't ask to ask

#

unless its worldbox

#

if its worldbox mod

limpid mantle
#

That is not a direct worldbox question but a code question

#

The reason I'm asking this question here is because World Box is achieving it.

#

And looks like i am not allowed to send a stackoverflow link

#

Okay i will move it here if it's not problem

main brook
#

yeah but

#

what's the thing

#

you wanna ask

#

if its not like worldbox directly

#

but a reference from it

#

is fine i guess

#

@limpid mantle

rose pawn
#

Hey rei

#

Ima try your code

#

Can you DM it to me or send it here as text

#

If you are on pc

main brook
#

just scroll back

#

its not that far

rose pawn
#

But it's an image ;-;

main brook
limpid mantle
#

How the world box provides pixel perfect when using zoom

#

I will try to explain in more detail

main brook
#

something called

#

canvas

#

i think it just renders the images on that focused perspective

#

in which it can just like

#

get the zoom level and resize the pixels based on that

limpid mantle
#

hmm but

#

this is from my game

#

wait i'm gonna send a v'deo

main brook
#

oki

limpid mantle
#

When camera zoom is 1f

#

hmm sending video is also not allowed

#

In short, there is no problem when the zoom I use is 1

#

When I use 1.31 zoom (For example), the view gets ugly

#

The reason it's like this is because I'm using the nearest filter. I have to use nearest filter for pixel art.

#

I want the map to look properly at different zooms.

#

when zoom is 1.0f, 1 unit equals 4 pixels(world is 320x180, screen is 1280x720) and there is no problem as there is integer scaling. but since I use zoom it is not possible to always keep the scale at the integer number.

limpid mantle
#

Do you have any idea about this, Rei?

timid field
#

I just like observe and understand

rose pawn
#

Is there a chance anyone here knows how to use datetime module in python

distant wraith
#

I know how get current time in any timezone

#

But other than that

#

None

rose pawn
#

2022-05-01T01:02:08 + 05:00

#

How can I only take the utc hour this is of

#

Or the same for day

#

There will be many of these dates and I want to sort them by hour or day or moth or whatever

barren shale
#

i'm 99.99% you dont know how to google things

#

judging by how you are asking questions here

orchid frigate
#

I feel like the documentation of whatever library you are using has an answer to all your questions

#

I know its boring to go through documentations but with some searching technices you could find things 10x faster

floral sedge
#

Use control shift QQ

timid field
#

I started some unity game 2 days ago as a beginner, so far not bad progress

#

Most of my time i spend rn is developing the game

timid field
#

Well i do have a game concept but may and may not change

#

It would be a pixel game

main brook
#

there's a probability that the string is in a format datetime understands

#

okay found it

#

@rose pawn

#

datetime.fromisoformat

#

this take a string

#

and return the datetime

barren shale
#

unity is much harder than it looks

#

its easy to make small games

#

but big games on unity are way harder than you think

mellow gorge
#

HAPPY PRIDE MONTH

mellow gorge
#

Ok so we doing parent jokes?

main brook
#

its really off topic

#

but

#

don't assume we all don't care about pride month

#

some of us do some don't

#

just because we didn't say it here

#

smh

next lotus
main brook
#
System.out.println("happy pride month")
#

or something

#

now it's code related

rose pawn
#

Rei I will check your code thank yoy

barren shale
#

i read a really good guide a couple of years ago

#

i forgot the link

#

but you should read one of them

#

even stackoverflow has a guide on how to ask questions which i guess you didnt read

rose pawn
#

Nah ppl on stack overflow are rude 😤

next lotus
#

lol

timid field
#

Sometimes the question askers dont search on google yeah but if they did and couldnot find then that sucks

wet girder
#

knowing how to ask questions is the most important skill for programmers

#

it's the whole basis for our work

rose pawn
#

That sounds cultish

#

But ok

wet girder
#

aren't programmers all in a cult

barren shale
# rose pawn That sounds cultish

why would someone take effort to give you information if you are not willing to take effort to search it up first and/or ask a question that can be answered without causing confusion which causes more effort

#

that's not cultish

#

you're just lazy

#

and none likes that

timid field
#

Yeah

#

Unity Gave me nightmares everytime i forget to add a ; in every line

timid field
timid field
#

If otherwise i think i can make one

#

Sure scripting is hard but my game would sometimes use basic functions

#

And i already have an understanding in coding from roblox as i was a roblox developer

#

Not same coding language but can understand what to do or how

orchid frigate
#

I hate when people get picky with their questions

#

Like

#

Im not about to write a 300 line question for an answer thats as big as 2 sentences

knotty root
#

is there a script in mobile to unlock all traits?

cloud solar
#

Not here

knotty root
#

where

cloud solar
#

Its not wb channel

#

But i think there is no such thing

#

Just go to files

#

And in game data

#

Change it

knotty root
#

to?

cloud solar
#

Go inside main game files

#

The search a bit

barren shale
#

like v rising

#

the new game that just came out

#

its made in unity

#

gets 80 fps on a 3090

#

it should get around 130 at least i think

#

but it is early access and still not optimized

#

you will notice if you ever tried to make a game that's a bit complex

#

you wil get very low fps

#

unless you optimize with best practices

rose pawn
#

Hamza is your pfp nicolangelo or da vinci

timid field
#

My pc is considered extremely weak so ofc i wont go hard than my pc can handle

#

If i succeeded the game will be available for lot of low end devices

#

And V Rising is 3d and my main focus is 2d

#

2d isnot usually laggy

next lotus
timid field
#

Nope

#

I came from roblox

wet girder
#

even worse

next lotus
#

thatslua right?

timid field
#

Yea

wet girder
#

lua is a garbage language for garbage programs

timid field
#

Ik

main brook
#

actually

#

its a fork

#

of Lua

wet girder
#

Ik

main brook
#

because the features are weird

wet girder
#

makes it even more garbage

main brook
#

it has some Lua 5.2 but also some 5.4

#

which is somewhat weird

main brook
timid field
#

But gave me idea of how coding works

#

Roblox lua is almost like scratch but more practical and 3d

main brook
#

no

#

but i guess that's your experience

#

i experience it differently

timid field
#

Well yeah

main brook
#

everyone different so

#

i don't judge

timid field
#

Iam good at Roblox lua so yeah thats why i assume different stuff

#

Roblox development became bit more painful so decided to move to unjty

#

So far not bad as a beginning

main brook
#

funny thing

#

roblox beginner guide to code

#

is literally comparing Unity

wet girder
#

if you don't want to give 80% of your revenue to robloxc wise

main brook
#

and its own

main brook
#

so its fair for everyone

#

i don't make gamepasses

#

i just make everything purchasable virtually in game

#

UNLIKE THOSE CASH GRAB

#

if i don't gain anything

#

roblox doesn't either

#

👍

#

win win

timid field
#

Most android games idk how tf do they make them as if it was random generated

main brook
#

vscode

#

for roblox

#

there's a Plugin and Extension that allows itself to bridge both app

timid field
#

I use vs code for unity

main brook
#

i use vscode for

#

roblox

#

its possible

#

and useful

timid field
#

Well yeah

main brook
#

because vscode extensions helps you code faster

timid field
#

But faster to use scripts inside roblox studio editor

main brook
#

eh

#

true

#

but its again

timid field
#

Instead of copying and pasting and sh**

main brook
#

jack of all trade

#

which reduces the quality

main brook
#

i swear

#

i actually learn the fundamental and concepts

timid field
#

I meant copying from vs code

#

To roblox editor

timid field
main brook
timid field
#

Been working hard for 3 days and today is the fourth

main brook
#

its shit

#

oh nice

#

goodluck

timid field
#

Thanks

main brook
#

im actually bored with programming

#

for a while

#

because like most of my projects

timid field
#

It may be boring if you get burnt out without being able to bypass it or solve it

main brook
#

are usually

#

super

#

useless

#

and people doesn't wanna use it

timid field
#

Rip

main brook
#

so i just watch videos about stuff i already know

#

and laugh at videos where they try to oversimplify it for beginners

timid field
#

Alright

main brook
#

also

#

is your profile amphibia

timid field
#

Nope its the owl house

main brook
#

oh

timid field
#

Alternate version of amphibia

main brook
#

a

#

i don't get it honestly

#

it just appears on my youtube feed

timid field
#

They do have cross overs of amphibia in the owl house

#

Well not actual ones but just images from amphibia

main brook
#

interesting

#

sounds similar to milo murphy's law and phineas and ferb

#

where they're both related just not directly

topaz summit
#

what language does worlbox use?

main brook
#

C#

#

@topaz summit

topaz summit
#

k

hollow bronze
rose pawn
#

Hello people and turtles

#

Rei!!!q1!1!1

#

It says invalid isoformat string
.

#

date = soup.select_one("#gif.borders") or ""
if date:
date = requests.get(str(soup.img["src"]))
date = re.split("CreateDate", date.text, re.IGNORECASE)[1][1:-6]
#date = date.text.split("CreateDate")[1][1:-6]
date = datetime.datetime.fromisoformat(date)
.

#

im not using #date = date.text.split("CreateDate")[1][1:-6] bcz it says no attribute of "text"

hasty bane
#

poor rei

rose pawn
#

Yeah Thanks rei for all your help so far

#

why is th

#

'2022-02-22T8:52:44+09:00' this gives isoformat error

#

however the ones that doesnt cause an error also doesnt change anything from the original date

#

Wait 🤨 🤨

#

It does work

#

It just doesn't assign isoformat version to the new date

rose pawn
#

ok now ⬆️ that is the only problem

#

actually no, other problem is that when I view the day of 5 different dates that are in the same hour it gives 3 different days, sunday monday and saturday, which must be impossible, I think the problem is that dates are not considered in the same timezone

#

how can I make it that it transforms all dates I give to the code into the dame timezone and then I can sort them properly

rose pawn
#

reeeeeeeeeeeeeei heeeeeeeeeeeeeelpppppppppp

#

plzzzzzzzzzzzzzzzz

#

here are the dates

#

2022-02-21T18:38:50-05:00
2022-02-19T18:56:13-06:00
2022-02-20T18:50:37+01:00
2022-02-14T12:41:08+03:00

#

and here is what days these are on accorind to the code

#

Monday
Saturday
Sunday
Monday

#

doesnt make any sense since these dates are minutes apart

barren shale
#

i see why you get downvoted on stackoverflow

timid field
#

What kind of dark magic is that

pale geyser
#

Some kind of dark magician's cave

#

that i afraid to see inside

rose pawn
#

Mods go away

#

Where is rei

#

Would rei be mad if I tagged them

#

@reiiiiii come help plslzlzlzlz

#

Ohhhh rei is sleeping

#

Or is it, sleePING HAHAHAHAHA

#

Just kidding I would annoy someone who's sleeping

orchid frigate
#

what in the actual fuck is going on in here

rose pawn
#

Why is everyone mods

#

Go away pesky mods

#

Don't chat here bcz when rei wakes up they need to see my messages

wet girder
#

Our mods are so Chads they can code

barren shale
#

someone is being lazy

pale geyser
rose pawn
barren shale
#

i would help but nah

#

if they wont help themself why would i

rose pawn
wet girder
#

can't

rose pawn
wet girder
#

can't miss shit like this

barren shale
wet girder
#

IEM dallas G2 vs Furia is going on

#

real treat of a match

rose pawn
#

Hey mods don't chat off topic or mods might more you wbsmirk wbsmirk wbsmirk

#

If you see rei pls tell them I need their help

#

Rei help

#

Btw This is totally on topic

#

technically

rose pawn
main brook
#

why are you overriding

#

when you do the second line

#

just do like

#

r = requests.get()
date = r.text.split("CreateDate")[1][1:-6]

#

what does

#

"date" outputs

main brook
#

im like

#

not always here 24/7

#

also those are what timezones do

main brook
#

also

#

if the output is different

#

what are your inputs

#

it works persistently for me

rose pawn
#

'2022-02-22T8:52:44+09:00' this gives isoformat error

#

When I try to turn it into isoformat

rose pawn
#

Now I only have two issues

#

issue 1:

#

datetime.datetime.fromisoformat("2022-02-21T8:12:45-06:00")

#

this gives Invalid isoformat string: '2022-02-21T8:12:45-06:00' error

#

same with this date 2022-02-22T8:52:44+09:00

#

issue 2:

#

I am trying to convert all dates into UTC time by using this code: date.astimezone(pytz.UTC)

#

import pytz first

#

but it doesnt work

#

if only someone whose name starts with r and ends with i and has e in the middle helped me

#

if they are avarible of course

timid field
main brook
#

@rose pawn

#

give me your whole code

rose pawn
#

Okay

#

date = soup.select_one("#gif.borders") or ""
if frames:
date = requests.get(str(soup.img["src"]))
date = date.text.split("CreateDate")[1][1:-6]
#date = re.split("CreateDate", date.text, re.IGNORECASE)[1][1:-6]
date = datetime.datetime.fromisoformat(date)
date = date.astimezone(pytz.UTC)
date = (date.strftime("%c"))

#

import re
import datetime
import pytz

main brook
#

you do know

#

you're having a reference error

#

plus

#

where did you get the "soup"

#

i said

#

all

#

not partly

rose pawn
#

def get_data(id_):
url = "https://folioscope.co/blank/" + str(id_)
soup = BeautifulSoup(requests.get(url).content, "html.parser")

date = soup.select_one("#gif.borders") or ""
if frames:
    date = requests.get(str(soup.img["src"]))
    date = date.text.split("CreateDate")[1][1:-6]
    #date = re.split("CreateDate", date.text, re.IGNORECASE)[1][1:-6]
    date = datetime.datetime.fromisoformat(date)
    date = date.astimezone(pytz.UTC)
    date = (date.strftime("%c"))



return date
main brook
#

wrap it

#

in codeblcok

#

codeblock

#

```py
(code here)
```

rose pawn
#

ok wait

main brook
#

why does it take

#

6 minute

rose pawn
#
from multiprocessing import Pool
import requests
from bs4 import BeautifulSoup
from PIL import GifImagePlugin, Image
import urllib3
import os
import re
import datetime
import pytz

def get_data(id_):
    url = "https://folioscope.co/blank/" + str(id_)
    soup = BeautifulSoup(requests.get(url).content, "html.parser")
   
    frames = soup.select_one("#gif.borders") or ""
    if frames:
        frames = str(soup.img["src"])
        with open('/tmp/fo.gif', 'wb') as f:
            f.write(requests.get(frames).content)
        """frames = os.path.getsize('/tmp/fo.gif')
        if frames > 0:"""
        frames = Image.open('/tmp/fo.gif')
        frames = (frames.n_frames)

    date = soup.select_one("#gif.borders") or ""
    if frames:
        date = requests.get(str(soup.img["src"]))
        date = date.text.split("CreateDate")[1][1:-6]
        #date = re.split("CreateDate", date.text, re.IGNORECASE)[1][1:-6]
        date = datetime.datetime.fromisoformat(date)
        date = date.astimezone(pytz.UTC)
        date = (date.strftime("%c"))
    
    return frames, date

Data = []

if __name__ == "__main__":
    with Pool() as pool:
        for frames, date in pool.imap_unordered(
            get_data, range(2104877,2104889)
        ):
            if frames and date:


               
Data.append(frames), Data.append(date)
main brook
#

lots of unnecessary code

#

but oki

rose pawn
#

i deleted stuff too because discord didnt let me send

#

100% sure it wasnt the problem

main brook
#

righr

#

just use

#

and then paste your code

#

and save

#

after that the url changes

#

copy that here

rose pawn
#

thats right i didnt use dictionaries

#

its easier this way okay?

#

if you are gonna run the code i recommend you erase "frames" part since that is pretty problematic

main brook
#

no idea why it doesn't work for you

#

it works normally for me

rose pawn
#

def data(p):
if p == 69:
print(Data)
else:
for i in range(0,len(Data),8):
print (Data[i+p], end= "\n")

main brook
#

?

rose pawn
#

data(7)

#

to get dates

#

wait you gotta increase id

#

i will tell you shorlty

main brook
#
import requests
from bs4 import BeautifulSoup
import datetime

def get_data(id_):
    url = "https://folioscope.co/blank/" + str(id_)
    soup = BeautifulSoup(requests.get(url).content, "html.parser")
    date = soup.select_one("#gif.borders") or ""
    date = requests.get(str(soup.img["src"]))
    date = date.text.split("CreateDate")[1][1:-6]
    date = datetime.datetime.fromisoformat(date)
    return date
#

works normally

#

not sure why yours wouldn't

rose pawn
#

wit

#

wait

#

change range with 2104800,2104840

main brook
#

also

#

p

#

okay

#

@rose pawn

#

note i didn't change anything

#

it works

#

no idea watchu mean

rose pawn
#

okay

#

'2022-06-04T1:01:31+01:00'

#

turn this to isoformat

#

datetime.datetime.fromisoformat('2022-06-04T1:01:31+01:00')

#

did it work

main brook
#

its missing

#

a single

#

0

#

after the T

#

T1

#

its supposed to be

#

T01

rose pawn
#

well this is the date that came from the website

#

what can i do about it

main brook
#

okay you can alter it

rose pawn
#

how can i automate that

#

there is gonna be hundreds of flawed dates when I run the code in the big sclae

#

i cant manually alter them

#

plus its really complicated to alter strings

main brook
#

@MzxzM#8762

#

not really

#

just add a single 0

#

if the number after the T

#

is only length of 1

rose pawn
#

can u mystbin that

#

okay i think i get it

main brook
#
iso = '2022-06-04T1:01:31+01:00'
iso_split = iso.split(":",1)
if len(iso_split[0].split("T",1)[-1]) == 1:
    num = f"0{iso_split[0][-1]}"
    iso_split[0] = f"{iso_split[0][:-1]}{num}"
iso = ":".join(iso_split)
datetime.datetime.fromisoformat(iso)
#

i changed the bottom to

#

T12

#

and it works normally

#

not sure how you got

#

a weird result

#

from the website

rose pawn
#

this doenst work

#
date = soup.select_one("#gif.borders") or ""
    if frames:
        date = requests.get(str(soup.img["src"]))
        date = date.text.split("CreateDate")[1][1:-6]
        #date = re.split("CreateDate", date.text, re.IGNORECASE)[1][1:-6]
        iso_split = date.split(":",1)
        if len(iso_split[0].split("T",1)[-1]) == 1:
            num = f"0{iso_split[0][-1]}"
            iso_split[0] = f"{iso_split[0][:-1]}{num}"
        date = ":".join(iso_split)
        datetime.datetime.fromisoformat(date)
        date = date.astimezone(pytz.UTC)
        date = (date.strftime("%c"))
main brook
#

"doesn't work"

#

what does that mean

#

its not explanatory

#

like

#

what doesn't work

#

anything?

#

side effect?

rose pawn
#

AttributeError: 'str' object has no attribute 'strftime'

#

TypeError: 'str' object is not callable

#

AttributeError: 'str' object has no attribute 'astimezone'

main brook
#

yeah

#

like

#

did you forgot something?

#

maybe a variable assignment??

#

just look above it

#

its in plain views

rose pawn
#

ohhh

#

wow it almost worked

#

but ValueError: Invalid isoformat string: '٢٠٢٢-٠٦-٠٤T٠٥:١٠:٠٢+03:00'

#

why is it like this

#

the date depends on the language of the poster

#

geat

#

great

#

now thats impossible to fix

main brook
#

very impossible

#

that's really fucked up website

rose pawn
#

maybe there is another date in the site

#

i will have a look

next lotus
#

python moment

orchid frigate
#

python moment

next lotus
main brook
#

no like

#

writing

#

literally all they had to do

#

is copy paste

#

why is it taking like 6m

rose pawn
#

there were so many unnecesseary code okay

next lotus
#

slow python programmers scripters writing their essay language

main brook
#

when someone said

#

all

#

they mean

#

all

#

don't cut anything

#

a small detail matters

rose pawn
#

btw this is the url that causes problem

main brook
#

page doesn't exist

rose pawn
#

the interesting thing is it does

rose pawn
#

yeah

#

tho my link should work too

#

why doesnt it

main brook
#

because

next lotus
#

dude

main brook
#

also

#

(blank)

next lotus
#

m o m e n t

main brook
#

your issue is unfixable

#

its the website fault

next lotus
#

@rose pawnwhat are you trying to achieve

main brook
#

getting a post date

#

of a gid

rose pawn
#

wait im confused

main brook
#

gif in a website

#

the website is tarded

#

bad design

next lotus
#

what are you trying to achieve by this url

main brook
#

no idea

#

for me

#

they probably

#

mistyped it

rose pawn
#

yup

#

so why does this cause a problem

next lotus
#

what's the problem

main brook
#

bad design

rose pawn
#

go to the page

main brook
#

from the website end

rose pawn
#

im so sad

#

this is the source

#

rei what can i do

#

does datetime have like a datae trnaslation thing

#

wtf is this even a real language

#

'٢٠٢٢-٠٦-٠٤T٠٥:١٠:٠٢+03:00'

#

i cant translate it

#

it looks like arabic??????????????????

#

bill microsoft do you

next lotus
#

no

#

i dont

rose pawn
#

ok

#

":("

next lotus
#

i dont speak shawarma

#

i only speak c#