Jump to content
UBot Underground

mdc101

Fellow UBotter
  • Content Count

    119
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by mdc101

  1. Hi John I got the issue fixed.
  2. John you were spot on as usual! What threw me was the create table command which I was not aware off. Thanks for the replies
  3. Hi John Thanks for the response. Lily pinged me a section of code that did the trick and I want to share with everyone as I have tried doing this for days. See code to call data from csv or xls files into a list create table from file("C:\\path_to_file.csv", &mytable) set(#counter, 0, "Global") loop($table total rows(&mytable)) { add item to list(%mylist, $table cell(&mytable, #counter, 0), "Delete", "Global") increment(#counter) } remove from list(%mylist, 0)
  4. Hi John Thanks for the reply In the code block is the sample data that is in the csv. All I need from this file at this particular time is the keywords in the "Keyword" column. Column A in spreadsheet. How do we get this column into a table as the data is downloaded and then as I move through a procedure I need to use / call the keywords from the csv file to add to a list or variable? If you save the sample as sample.csv and then show us I am sure this will help a lot of us who need to use flat file data to save memory especially when the lists can be a few thousand rows. Keywo
  5. Hi Folks I have been looking all over the forum to find the simple way of buildinga list from a csv file. What needs to be done is a column must be specified and all data in the column added to a list. How is this done as it is baffling me?
  6. Hi John Here is the code that grabs the data and is supposed to set it #QQulr is the scrape add list to list(%QquestionUrls... is the part that adds the data to the list. This block is in the middle of the code. wait(1) comment("grab urls for questions") set(#QQulr, $scrape attribute(<class="result_item">, "href"), "Global") wait for element(<class="lil_action_button submit_button col">, "", "Appear") wait(1) comment("Start ---------- not setting list") add list to list(%QquestionUrls, $list from text(#QQulr, $new line), "Delete", "Global") set(#FirststLevelQ_total, $
  7. Is there a way to do a check for the different variations of a keyword with cases? at the momoment I have the following challenges 1)add list to list(%QquestionUrls, $list from text(#QQulr, $new line), "Delete", "Global") is not adding the scraped data to a list when i press run. It only adds when I press Run Node 2) I am still gettig the exceed range of list even after applying Johns suggestion. 3) What I have noticed is if the keyword is in the list but has CAPS or Proper case or one of the words has a capital letter, the row is removed from the list as it does not match the keyword "
  8. Hmm watching the code run it seems to hop over the add list to list which then causes the exceed error. here is the code comment("Clear all lists") clear list(%QquestionList) clear list(%QquestionUrls) clear list(%QSeedKW) clear list(%QISDNA_categories) clear list(%QISDNAList) clear list(%QTopAnswersBy) clear list(%QISDNAList) clear list(%QISDNAListViewed) clear list(%QISDNAmonitor) clear list(%QISDNAQuestionFollowers) clear list(%QISDNAQuestionStatFollowering
  9. Thanks, Am running the code and all of a sudden the add list to list is not working when I press run. It works when I press run node but not when I run the script??? Has this happened to anyone?
  10. Hi gakebet Your suggestion worked How do you manage the loop because the list is shrinking every time a row is removed? I get exceeded range... after a few runs set(#QQulr, $scrape attribute(<class="result_item">, "href"), "Global") add list to list(%QquestionUrls, $list from text(#QQulr, $new line), "Delete", "Global") set(#FirststLevelQ_total, $list total(%QquestionUrls), "Global") set(#FirststLevelQ, 0, "Global") loop(#FirststLevelQ_total) { if($contains($list item(%Qquest
  11. Hi Kreatus Thanks for the code. I am not trying to remove the ?q=content+nation as it is reqired to load the page when the url is called. I am trying to find my keyword in the full url string /Where-do-I-find-content-nation?q=content+nation If the keyword is there I want to keep it else if it does not exist as the phrase "content-nation" then I will remove from list Thanks again for the suggestion
  12. unfortunately I cant post the bot To simply the question I need to check a url If the url contains my keyword (content-nation) I keep it else I delete it if it does not (remove from list). The challenge I have is that each url has the keyword added as ?q=content+nation maybe this is not important. However my if statement is not working. How would one do a if statement that looks for * content-nation * with wildcards on each side? I gues that is a simplified questions within the urls. Out of this data set only one url qualifies. See number 2, this would be the only one to keep and t
  13. Hi Guys I have done a search using the variable #SearchString = "content nation" I added a dash between the word to make the search easier using a filter #SearchStringDashed = "content-nation" I have scraped a bunch of question urls. #QQulr: /Why-has-Google-trouble-indexing-foreign-language-content-contained-at-a-national-top-level-domain-What-are-the-solutions?q=content+nation /Where-do-I-find-content-nation?q=content+nation /How-do-hyperlocal-sites-(e.g.-Craigslist)-architect-their-technology-to-support-hyperlocalities-as-well-as-sitewide-nation-wide-global-content?q=content+n
  14. Got this figured out. used the following code. set(#SearchString, $trim(#SearchString), "Global") set(#SearchStringDashed, $replace(#SearchString, " ", "-"), "Global") set(#SearchStringDashed, $trim(#SearchStringDashed), "Global") By triming the variable it removed the white space that created the last "-"
  15. Hi Experts I am trying to add a dash between words and have the following code. set(#SearchStringDashed, $replace(#SearchString, " ", "-"), "Global") What happens is I am getting a dash at the end of the string. example "brown-cow-" it should be "brown-cow" How do I prevvent the last "-"
  16. Hi Is it possible to have a command that "listens" for particular errors in UBOT so we dont have to keep dropping the error management into the routine? Example we have a command that catches potential errors or failures. These "exist function" statements hold the remedy for the particular errors, so the bot can adjust and move on with task. Now currently I am putting the call to the custom function in the areas where the failures could happen as the bot runs the routine. I was just wondering if there is a way that we can use the error catching function to listen for the possible errors
  17. Hi john I have sent you a private message with what I am doing Thanks Matt
  18. example 988 988 will be written back into the single cell in csv instead of just 988
  19. HI Thanks for the response. I am not sure if your example will check if there is a leading / before the url. There is a list of urls that are being looped through. Some are missing the "/" Its those url we need to add the replace "/" nextlistitem so the url is corrected.
  20. Thanks John I am still getting duplicates in the variable? Could this be a bug?
  21. Hi Folks I have come up against an odd scraping issue. I am scraping the following html This question has been viewed <strong>988</strong> times; it has <strong>1</strong> monitor with <strong>11277</strong> topic followers and <strong>0 </strong><a href="/Does-a-vanity-URL-shortener-improve-SEO/alias">aliases</a> exist. here is the code if($exists(<innertext="Question Stats">)) { then { comment("Question viewed - times") set(#QuestionViewed, $page scrape("This question has been viewed ", " times; it has "), "G
  22. Hi I am scraping a list of urls. The majority have the leading / /BacklinkMafia-com/What-is-a-backlink However I have noticed that some have the leading / missing BacklinkMafia-com/What-is-a-backlink How do you check if the leading / is present and if it is not then add it in. the urls missing the leading / cause the page to get a dns error message Any help will be appreciated Thanks Matt
×
×
  • Create New...