Jump to content
UBot Underground

Faster way to scrape a site?


Recommended Posts

Am I doing this right? My bot does what I want it to do but I have so many more links for it to go to I am starting to think there is a better way to do this that I have not thought of yet. Please can someone look at my bot and make some suggestions. The reason I am doing it this way is because every page has a different number of items... Open to hear a better way to make me a better ubot user :D

scrapemotosuperstore.ubot

Link to post
Share on other sites

Jimbo, I have coded a much simpler solution for you, but for some reason one command is malfunctioning. As soon as I talk to Eddie about why this is happening, and get it resolved, I will post it for you. I used about 70% less coding.

 

John

Link to post
Share on other sites

Jimbo, I have coded a much simpler solution for you, but for some reason one command is malfunctioning. As soon as I talk to Eddie about why this is happening, and get it resolved, I will post it for you. I used about 70% less coding.

 

John

 

Thank you so much. I knew I must have been doing something wrong. I was going to proceed to make my bot but figured i better post and see if i could save some time and learn something at the same time. I have so many more sections to scrape on that site and in all i want to be a better scraper :D. Thank you and I can not wait to check out your bot :)

Link to post
Share on other sites

Ok, here is the code that I generated. You will find that the while loop seems "broken". It's not...the site is very poorly coded and the a href tag exists even when the next button is no longer a hyperlink. You will just need to find a different attribute or element to base the while loop on. The idea here is to just show you at least one way to condense all that code.

 

John

scrapemotosuperstore.ubot

Link to post
Share on other sites

You're welcome. I apologize I didn't have enough time to figure out the workaround to that site's coding issue, but I hope you got an idea of at least one way you can get away from that "linear" approach to coding in UBot.

 

John

Link to post
Share on other sites

Yeah I have started taken more a really coding look at my ubot logic. Your bot opened my eyes and just like in my programming classes when i draw a diagram of my programs I will start doing the same thing with ubot then figuring out how it works in ubot :)

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...