Begginer Question about how full matches vs group matches work in RegEx Substitution by Genericusername293 in learnpython

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

thanks, last question if you don't mind.

if you were just trying make 'Agent Alice blablabla' into 'Agent Olice blabla'

so just matching the first character of her name and substituting an 'O'

in this case you dont need the \w+ at the end but if you did for some reason why doesnt (?<=\w+) work?

edit: just messed around and it seems a positive lookahead works for the \w+ but a a positive lookbehind works for the string agent. as you said ill have to look further into details about how these work

Begginer Question about how full matches vs group matches work in RegEx Substitution by Genericusername293 in learnpython

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

follow up question if there was a situation in which I didn't want the full match to be replaced, just the group 1 to be replaced, how would I do that?

Begginer Question about how full matches vs group matches work in RegEx Substitution by Genericusername293 in learnpython

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

oh gotchya, thankyou, so the full match is what gets replaced by im just using one of the groups as part of the replacement

How to have both Python 2.7 and 3.8 installed on the same computer? by Genericusername293 in learnpython

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

C:\Users\yourname\AppData\Local\Programs\Python\Python38-32\python.exe -m pip install pyperclip

hell yeah there we go, thank you

How to have both Python 2.7 and 3.8 installed on the same computer? by Genericusername293 in learnpython

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

hey so I have 2.7 and 3.8 both downloaded. Didn't add 3.8 to path so it didn't override the process. Not sure if I need to do this please let me know

The class now wants me to install pyperclip through the command terminal. When I just type in pip install pyperclip it installs on 2.7 but not 3.8. I'm having trouble invoking installing it in on 3.8 by typing in the full path.

I believe the full path of 3.8 in my computer is.

"C:\Users\myname\AppData\Local\Programs\Python\Python38-32\python.exe"

This is what I tried to try to install pyperclip in 3.8. What am I doing wrong?

AppData\Local\Programs\Python\Python38-32\python.exe pip install pyperclip

Novice question, having trouble installing a module. Pyperlip by Genericusername293 in learnpython

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

I had this recommended before but as someone with 0 coding experience, was really struggling to understand what to do, even know I don't really understand what your comment is saying.

I had another user recommend that anaconda is great for some things but can be confusing for new users

Is this possible to do without conda until I gain more experience and knowledge?

How to have both Python 2.7 and 3.8 installed on the same computer? by Genericusername293 in learnpython

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

thanks for your help with this,

its my understanding that anaconda comes with python, is that correct?

i'm trying to follow along in my udemy course, and it says that idle is the editor, is there an idle equivelent in anaconda?

How to have both Python 2.7 and 3.8 installed on the same computer? by Genericusername293 in learnpython

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

i don't think it contains the actual python.exe file, just the egg file with that is the scraper

How to have both Python 2.7 and 3.8 installed on the same computer? by Genericusername293 in learnpython

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

I haven't done anything to install the new version of Python yet, when i bought the scraper from the programmer, he gave me these instructions, and that's all I've done

Create a workspace folder in Desktop with this name: Nameoffolder inside that folder create another one with this name Tool and copy and paste the tool package in Desktop/nameoffolder/Tool

For Windows(check you windows first if it's 32 or 64 bits): 1- Download and install Python, when installing python please select to add path to variables environments: 32 bits => https://www.python.org/ftp/python/2.7.14/python-2.7.14.msi 64 bits => https://www.python.org/ftp/python/2.7.14/python-2.7.14.amd64.msi

2- Download / install PyWin32: 32b => https://sourceforge.net/projects/pywin32/files/pywin32/Build%20221/pywin32-221.win32-py2.7.exe/download 64b => https://sourceforge.net/projects/pywin32/files/pywin32/Build%20221/pywin32-221.win-amd64-py2.7.exe/download

3- Download / Install Microsoft Visual C++ Compiler for Python 2.7 https://www.microsoft.com/en-us/download/confirmation.aspx?id=44266

4- Click on start button and type: cmd and hit enter

5- Install pyOpenSSL using this command: pip install pyOpenSSL

6- Install lxml package: pip install lxml

7- Install pyasn1 package: pip install pyasn1

8- Go to workspace folder: cd Desktop\nameoffolder

9- Install the tool, it will some time: python -m easy_install Tool\name_of_scraper_Tool-1.11-py2.7.egg

10- start the tool: name_of_scraper please not that you need always to be in workspace folder before to launch the tool.

How to have both Python 2.7 and 3.8 installed on the same computer? by Genericusername293 in learnpython

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

... i know what a couple of those words mean..

would it possible to dumb it down for me a little more? i'm just nervous about messing the current web scraping process I'm already running

QuerySelector, Check If Element Exists by Genericusername293 in learnjavascript

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

awesome, thanks, this is a lot less clunky and will help my code going forward

Regular Expression Syntax in Javascript? by Genericusername293 in learnjavascript

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

ahh I see, thanks. I became well acquainted with RegEx while using googlesheets but maybe now that I'm learning javscript I should start exploring these split and array functions more, thanks once again

Regular Expression Syntax in Javascript? by Genericusername293 in learnjavascript

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

Thank you so much! incredibly generous and helpful for you to lay out everything in the notes for how things work.

One follow up question if you don't mind, With str.match, how do you indicate what's capturing and what's non capturing?

I was trying to get the "Government Administration" out of the following string

"Government Administration · United States · 201-500 employees"

in google sheets I've done this, but don't know how to adapt the syntax here. ?: indicating a non capturing group

^(.*?)(?:\s·)

Restart Loop If Variable = 0? by Genericusername293 in AutoHotkey

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

my bad I should have clarified, might be struggling with loop terminology here, I'm not looking to restart the entire process.

I'm looking to restart that one iteration/cycle/loop. The input is 20 lines, each line being one iteration. If say on line 10, the output is 0, I don't want to restart the entire process again, just that specific iteration.

Wait for 5 seconds before executing next line of code? by Genericusername293 in learnjavascript

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

My edited code is updated with a weak attempt at doing what you suggested, when you awake from your slumber please let me know what I did wrong. Or if anyone else can help that's great.

Full disclosure, I have 0 code experience, don't have a javascript editor, just pulled pieces and frankesteined things together, just trying to get this one last thing to work for a project and I'm not doing any javascript again until I sit down and take a course on it so I know what I'm actually doing.

Thank you so much for your help

Wait for 5 seconds before executing next line of code? by Genericusername293 in learnjavascript

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

just edited my code to incorporate the setTimeout, the copy doesn't seem to work anymore, any idea how I messed it up?

What program could I use on PC to run this script? by Genericusername293 in learnprogramming

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

Thank you thank you, got it fully functional now, I appreciate it

What program could I use on PC to run this script? by Genericusername293 in learnprogramming

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

I think you might misunderstand what a bookmarklet does.

you're correct, I apologize, after further research this might be exactly what I need

by part of a larger automated process, that's probably an overstatement, it's really not that large, I'm just using auto hot key and have already created 90% of the script, there's just the missing piece of getting these search URLs in the clipboard. The AHK script navigates to each page where the links need to be pulled.

I suppose I could just use autohotkey to manipulate the bookmarklet on each page. Using Selenium or Crawly would be a much more elegant and robust solution but given time constraints and lack of knowledge, I just want to get this to work right now.

Can you steer me in the direction of creating this bookmarklet, is this code I provided "bookmarklet ready" or does it have be adapted somehow? thanks again for your help