Python Forum
Command is not rolling over to the next keyword.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Command is not rolling over to the next keyword.
#1
Hello, I'm actually pretty new to coding let alone using python. I found this open source script that I'm trying to run and having some issues with it. What happens is in the script it is set to place keywords at the end of the link when connecting certain webpages, e.g.: (Link) "https://www.off---white.com/en/US/search?utf8=✓&q=" + (keywords) "Converse", "UNC", "jordan" ... = "https://www.off---white.com/en/US/search?utf8=✓&q=Converse". What is happening is it will look at the first keyword with the link then go to the next link but it never searches the other keywords. Any help would be appreciated. Cool

Picture of the script running - https://drive.google.com/file/d/1cy6isEm...sp=sharing

def __main__():
    # Ignore insecure messages (for now)
    requests.packages.urllib3.disable_warnings()

    with open('config.json') as config:
        j = json.load(config)

    ######### CHANGE THESE #########
    #  KEYWORDS: (seperated by -)  #
    keywords = [                   #
       "converse", 
	   "UNC",
	   "Jordan", 
	   "Mercurial", 
	   "Zoom-Fly", 
	   "Nike",
    ]                             
    slack = j['slack']
    discord = j['discord']

    # Load sites from file
    sites = read_from_txt("ow-pages.txt")

    # Start monitoring sites
    while(True):
        threads = []
        for site in sites:
            # skip over blank lines and shit
            if not site.strip():
                pass
            else :
                t = Thread(target=monitor, args=(site, keywords, slack, discord))
                threads.append(t)
                t.start()
                time.sleep(2)
Reply
#2
Please, don't post images. Copy the output and the full traceback and post it respective BBcode tags.

To select and copy text from cmd window -> right click on cmd window title bar-> Edit-> Select All->right click on window title bar-> Edit->Copy
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply
#3
(Jan-29-2019, 07:14 AM)buran Wrote: Please, don't post images. Copy the output and the full traceback and post it respective BBcode tags.

To select and copy text from cmd window -> right click on cmd window title bar-> Edit-> Select All->right click on window title bar-> Edit->Copy

I do appreciate your concern regarding me posting an image. Besides the fact that I post a link and not an image, do you have any knowledge about what could be causing the problem i'm having in the original post. I also do like the quote in your bio Wink
Reply
#4
(Jan-30-2019, 06:50 AM)brightlite11 Wrote: I do appreciate your concern regarding me posting an image. Besides the fact that I post a link and not an image, do you have any knowledge about what could be causing the problem i'm having in the original post.
In addition to your appreciation of my concern you better familiarize yourself with forum rules and follow them. Please, don't post link to images. Everything from my original reply still apply. We also cannot tell anything, because the traceback is not visible. Copy and paste the output and full traceback in their respective tags.
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Find a specific keyword after another keyword and change the output sgtmcc 5 746 Oct-05-2023, 07:41 PM
Last Post: deanhystad
  Rolling Sum by Facility dsparker78 1 1,559 Nov-06-2020, 06:10 PM
Last Post: deanhystad
  Newbie question for a kind of rolling average of list of lits zydjohn 3 3,282 Dec-16-2017, 11:41 PM
Last Post: ezdev

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020