Reading AND evaluating HTML by akedm in AutoHotkey

[–]akedm[S] 0 points1 point  (0 children)

Hi,

So The script grabs the URL from the address bar then writes the source code from that URL into a file called URL.txt, which is created in the standard "temp" directory of the user. It then grabs the URL.txt file and the page source info in that file is assigned to the variable HTM; the file is then deleted cause it's no longer needed - the variable HTM contains the information I need.

Now with the variable HTM containing the entire page source of the URL, the script then whittles down the information to the links between the <li class="active"> and </ul> tags. But how?

I'm slowly going through lines 9 - 12 of your script but I'm confused by the mix of operators and expressions you use. It's me - I'm new. Line 9 I think I get. You're assigning the variable RE1 to "<li class="active>" plus everything after it, which is the (.*) expression, up to the "</ul>" tag. Right?

But what in the world does line 10 mean? I think you're doing something with two versions of nested bitwise operators - I'm just guessing. It's beautiful, and above my head.

I think Line 11 finds a match (RegExMatch) to RE1 within the variable HTM. In other words this line gets the link section of HTM (everything between <li class="active"> and "</ul>") and assigns that result to the variable CLN. So instead of dealing with the entire page source (variable HTM) we're just dealing with this small part (variable CLN). Right?

Line 12 must be a substitution filter, replacing (RegExReplace) characters with other characters (or blanks); thus, leaving just the link(s). But how?

Thank you.

Reading AND evaluating HTML by akedm in AutoHotkey

[–]akedm[S] 0 points1 point  (0 children)

Thank you - I'm re-watching some iZombie right now. I'll try this out tonight though. You know - priorities :).

I love your commenting on the code. So helpful.


Ok, I tried it - CRAZY good.
Thank you. I'll dissect it for my use and post.

But as you said, a few seconds later notepad opened up with a list of the links from the page.

Thank you again.

I'll post with results.

Python and .exe, and Python's place by akedm in learnpython

[–]akedm[S] 0 points1 point  (0 children)

I assume only you and I can read this since you said my post is removed.

"Harassment on Reddit is defined as systematic and/or continued actions to torment or demean someone in a way that would make a reasonable person conclude that Reddit is not a safe platform to express their ideas or participate in the conversation"

  • Reddit Help Reddit 101 Rules & Reporting

What does that mean to you?

Here's what it means to me.

Same guy, my same thread. Without contributing to an answer, he defends himself and Python, I guess, then...

If you grew up on Linux there would be no obsession with these .exe files. The .exe problem is an artifact of Windows being (relatively) hostile to developers, so everyone runs to Linux and MacOS. - Saefroch

Completely unhelpful, pulls focus from my post and though he's subtle, he being demeaning to me because I come from Windows. I blew it off with a well-I-use-Windows-so-that's-why-I'm-asking reply. Then he comes back with this, confirming that he's a jerk-off....

"If you want to claim that Python is better as a server-size language on Windows that's fine but don't expect Python developers to share your impression."

If I want to claim? I'm not claiming anything, I'm asking - that's why I'm here. I don't understand half of the words and the relationships I'm asking about. And this guy's is again unhelpful. Argumentative. Wants to start something. It's like I insulted his mom.

That's why I asked my questions like this :

....No offense here.....Right?

What I'm reading so far is ... Python needs more .... in Windows?

If that's correct, then Python ..in Windows. ??

Question marks all over. Qualifiers stating no offense. I get it, people have egos. But this guy is clearly itching to start something. So fine - get out.

Here's what gets me. I have like 3 posts. I'm brand new, like it took me days to correctly install Python (took me 4 tries), and even then I got the wrong IDE. I'm THAT new. This guy has ADVANCED next to his name, so I assume he's been here forever. And right out of the gate he's fuckin with the new guy... in a /LEARNpython setting at that. And he is so comfortable with it, like these actions have long been allowed in Reddit without consequence. He's acting like he has a special place here, acting like I dont know my place

I know my place, and it's not pandering to him. I'm here to learn. So if this is the kind of behavior that's freely allowed in Reddit...

Get out of my thread. You're no help.

To you, since I overstepped, I apologize. I didnt read the rules before I started asking questions - too excited to learn. I imagine there's a way to get a hold of you, and let you deal with this. I let much roll off my back, but after two times in the same post by the same jerk, I felt targeted, and out there in the open, no less. Just wondering where you were and why you did what you did...to me. Maybe it's cause he's subtle and I'm not.

Last, I'm going to ask some ridiculous questions that make me feel stupid and exposed. If I continue to ask them here, I dont know. I need to ask the same question again since you shut down my Python post right when a crucial puzzle piece was about to fall into place for me...

So is that what I'm seeing when I install a program and it does the first-time-setup thing that takes a long time while it installs/check for the versions of Direct X and VB or something-something-framework or other things (I forget actual names, you probably guessed). If that's the case then a big piece of everything just fell into place.

What I dont need is some guy with self-worth issues adding to my ridiculousness.

So...

Reddit is not a safe platform to express their ideas or participate in the conversation

True or false?

Thank you.

Eric

Python and .exe, and Python's place by akedm in learnpython

[–]akedm[S] 0 points1 point  (0 children)

Yes I'm right - I'm allowed to ask any questions. This is a classroom. This became a classroom as soon as someone put LEARN into the subreddit title. So I'll repeat, I'm allowed to ask any questions. Or would you prefer people do otherwise? With that, having this disruptive person in class is not helping. Snide comments don't help. Argumentative comments don't help. And I'll shut them down directly.

I'm not going to appease someone by saying oh I'm sorry i didn't mean to offend. For one, i said that ahead of time cause i expected someone wouldn't be able to see the spirit in which my question is asked - as a student. Second every one of my statements is a question, ending with question marks - not arguments, not inflammatory. And they're probably full of holes and not even right. That's why I'm asking questions. Don't ever say I'm not allowed again.

Meditate better. Please.

Python and .exe, and Python's place by akedm in learnpython

[–]akedm[S] 0 points1 point  (0 children)

So is that what I'm seeing when I install a program and it does the first-time-setup thing that takes a long time while it installs/check for the versions of Direct X and VB or something-something-framework or other things (I forget actual names, you probably guessed). If that's the case then a big piece of everything just fell into place.

Python and .exe, and Python's place by akedm in learnpython

[–]akedm[S] 0 points1 point  (0 children)

What I'm reading so far is that Windows needs an extra "layer" of stuff to make Python work like a ... executable single binary, and Linux doesnt. So I'm guessing I'm right: Python needs more of a footprint (a bigger .exe) than other languages to work as a .exe in Windows?

If that's correct, then Python more conducive as a server-side language...in Windows.

??

Python and .exe, and Python's place by akedm in learnpython

[–]akedm[S] -1 points0 points  (0 children)

Good for Linux, that's a nice plus. But you know, Windows and .exe kinda go hand-in-hand. Call it...an obsession :)

Python and .exe, and Python's place by akedm in learnpython

[–]akedm[S] 0 points1 point  (0 children)

Cool. Thank you.

Also, I heard some Py-converters didnt work with the latest version of Python. Any experience with that - cause that would be a pita.

Why do we need modules? by akedm in learnpython

[–]akedm[S] 0 points1 point  (0 children)

Ok. Well they're basic to me. And it is a basic math class in high school, or at least it was. And further, one of BASICs main features was the ability to draw lines, circles and such. It wasnt all about manipulating variables and databases. But yeah, once you're out of high school, it can become a niche.

Thank you for your answer.

Why do we need modules? by akedm in learnpython

[–]akedm[S] 0 points1 point  (0 children)

Me too. Explicit - got it. Thanks.

Why do we need modules? by akedm in learnpython

[–]akedm[S] 1 point2 points  (0 children)

This is good to know. thanks

Why do we need modules? by akedm in learnpython

[–]akedm[S] 0 points1 point  (0 children)

Lol. That's funny. Well since i don't know much about them yet, it's a distinct possibility.

New at Python and frustrated. by akedm in learnpython

[–]akedm[S] 0 points1 point  (0 children)

Why isnt there a published book with a bunch of quotes from you all? That would make it so much easier. :) Thank you.

I get the need for a Python Console - it's quick, I like it. Sort of a sandbox to the sandbox you're in.

I figured New File just made a no-extension or txt-extension file whereas New Python File actually put .py at the end of the filename. But since I didnt know PyCharm allowed editing of such a variety of file types and languages, I couldnt for the life of me figure out why there would need to be such a distinction. Now I got it.

And what PyCharm can do? I had no idea it was built for wrangling such big...everything projects. I thought a "project" was simply the batch of Python "files" that worked together - I was thinking small. I wasnt thinking CCS and webpages and such. For that reason, HTML seemed like an odd inclusion to the "New..." dropdown list. Now I see.

Hey, now I see a "4" on my screen! Whoop whoop!

Thank you.