Jump to content
UBot Underground

Socket Memory Issue (snippet of code)


Recommended Posts

Hi All,

 

New on here and been reading up over the long weekend as I have come into an issue. I have tried every avenue before posting. I originally started using a loop to run through a list of URLs in a browser and used the 'scrape attribute' function. Ran ok, but was a bit slow. I incorporated threads and I started having issue with memory creep where the bot would crash. I tried all sorts of things including closing the browser and reopening for each link etc. I then read up on using sockets and used some regex to get to the same output. This method is a lot faster than opening through the browser, but I'm still getting memory creep to the point that the bot crashes. It generally gets to the 5-600 items in the list before it crashes. I have tried to output the list and then clear but that hasn't helped.  Any help would be appreciated.

 

loop($list total(%Pro)) {
    plugin command("SocketCommands.dll""socket container") {
        plugin command("SocketCommands.dll""socket navigate""GET"$next list item(%Pro))
        add item to list(%ToAdd$find regular expression($replace regular expression($plugin function("SocketCommands.dll""$socket page html"), "([ \\t]*)\\r?\\n\\s+"$nothing), "(?<=(<meta name=\"crea\" content=\")).*?(?=(\"))"), "Delete""Global")
    }
}

Link to post
Share on other sites

is this in ubot4 or ubot5 at first glance(without copying into ubot) I cant see anything wrong have you got a larger code snippet maybe its something else.

Link to post
Share on other sites

is this in ubot4 or ubot5 at first glance(without copying into ubot) I cant see anything wrong have you got a larger code snippet maybe its something else.

 

Thanks for the reply. Is in Ubot5. The only things I haven't included are loading a text file into a list then exporting on completion.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...