Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Highlight and remove specific string of text
Ok sorry for my newb question, but I figured this was the best place to start. (no real python Knowledge)

Basically I am using a program Called EventGhost and from what I understand it uses Python.
I have a basic script that upon pressing a key, will highlight the browser and copy it to the clipboard
to then paste it into a Program to download the youtube videos for personal studies.

The only real issue with this script I have encountered is any video that is part of a playlist wich always
includes a &list= in the URL will cause the download program to download the entire playlist. now on a playlist's
main page, I can use the Url if I needed to copy all videos in it, but for individual videos I want that exist with
the &list= in the Url it's frustrating to have to delete this part and makes the script useless.

Ok so my question is can I make a basic python script that will take the clipboard after copying the URL and remove
the text &list= and all after it if it's in the URL and then paste it afterward in the download program?

Eventghost is basically a easy to use if this then that program that has various actions to execute
(Move mouse here, close this window, hit this key, ETC..) One of these actions is execute python script, this is why I am here.
You can post your code here. Use BB-Code tags

If you use youtube-dl for this task, you should add the parameter --no-playlist
My code examples are always for Python >=3.6.0
Almost dead, but too lazy to die:
All humans together. We don't need politicians!
well, I use Youtube-dlg which, if I understand correctly, is youtube-dl but with a GUI. And the eventghost script is basically a macro for it to press a sequence of keys and initiate mouse clicks

here is what I am using
Your image is not uploaded. Please check it.
Link to picture of my program
As was requested the first time, use BBCode. Most of us (myself included) aren't going to look at a picture of your code, but we'd be glad to help if you follow the rules.
Feel like you're not getting the answers you want? Checkout the help/rules for things like what to include/not include in a post, how to use code tags, how to ask smart questions, and more.

Pro-tip - there's an inverse correlation between the number of lines of code posted and my enthusiasm for helping with a question :)

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  How to highlight the cell SriRajesh 3 231 Dec-08-2019, 02:17 PM
Last Post: michael1789
  [ library recommendation ] search & highlight target texts in PDF? smallabc 1 158 Nov-27-2019, 10:40 AM
Last Post: Larz60+
  Delete specific lines contain specific words mannyi 2 172 Nov-04-2019, 04:50 PM
Last Post: mannyi
  Cannot Remove the Double Quotes on a Certain Word (String) Python BeautifulSoup soothsayerpg 5 384 Oct-27-2019, 09:53 AM
Last Post: newbieAuggie2019
  with input remove a string from the list konsular 3 193 Oct-12-2019, 09:25 AM
Last Post: konsular
  Converting a patterned string or text into excel table soup1987 1 224 Oct-03-2019, 01:37 AM
Last Post: Larz60+
  Highlight text in pdf pramodb35 1 188 Aug-03-2019, 02:58 AM
Last Post: Larz60+
  Highlight/Underline a string | ValueError: zero length field name in format searching1 1 456 Jul-01-2019, 03:06 AM
Last Post: metulburr
  Python start from a specific string line and write? searching1 1 322 Jun-27-2019, 02:28 PM
Last Post: perfringo
  write image into string format into text file venkat18 2 515 Jun-01-2019, 06:46 AM
Last Post: venkat18

Forum Jump:

Users browsing this thread: 1 Guest(s)