Jump to content
UBot Underground

Want user to input the list to scrape data.


Recommended Posts

Hi,

I am building a bot and I want the user to be able to choose which list should be worked upon.

 

The steps are :

 

User chooses list

Then that list is used to create a loop

where the bot navigates to each of the urls in the list

and then scrapes it.

 

I have got the scraping part correct.

The part that I am not getting is how to get the user to choose the list

and make the bot work with it.

 

Faraz

Link to post
Share on other sites

One way you could do this is you could use a UI list box, and have random words that represent each list.

cow=list 1

tree=list2

chicken=list3

 

 

Then use an if then else command:

 

If>Evaluate>Value 1=Cow

Then > draw from list 1

 

If>Evaluate>Value 1=tree

Then > draw from list 2

 

If>Evaluate>Value 1=chicken

Then > draw from list 3

Link to post
Share on other sites

One way you could do this is you could use a UI list box, and have random words that represent each list.

cow=list 1

tree=list2

chicken=list3

 

 

Then use an if then else command:

 

If>Evaluate>Value 1=Cow

Then > draw from list 1

 

If>Evaluate>Value 1=tree

Then > draw from list 2

 

If>Evaluate>Value 1=chicken

Then > draw from list 3

 

Well, actually I meant something different.

Maybe, I should have said a file.

So, I want the user to be able to choose any file from his hard drive.

Since the file is actually a list of links(or urls), that is why I said choosing a list.

But now I think I should have said file.

 

So, user chooses a file which contains a list of urls.

and then bot chooses each item from that list to scrape data.

 

How do I do that?

Link to post
Share on other sites

Do as Lillt suggest

 

filename1

filename2

filename3

 

The same logic applies. You can then apply a folder prefix and even append a filename extension to the selection.

 

Well, most probably I will be selling the bot and the problem is that I dont know, what are the different filenames in a person's hard drive.

So, how can I choose only 3 filenames.

 

Different persons can have various different filenames, and it is impossible for me to guess those names.

 

Hope you understand.

Link to post
Share on other sites

I would select generate a standard UI

 

Selection 1

Selection 2

Selection 3

 

Then I would have the client create a file with the filenames in that list

 

c:\data\filename1.txt

d:\otherdata\filename2.txt

c:\backup\filename3.txt

 

I would then explain to the user that this is a one to one relationship that

 

"Selection 1" would equate to c:\data\filename1.txt

"Selection 2" would equate to d:\otherdata\filename2.txt

"Selection 3" would equate to c:\backup\filename3.txt

 

That is the way would approach until the ability to dynamically load the UI fields programmatically.

 

I hope that helps.

Link to post
Share on other sites

I would select generate a standard UI

 

Selection 1

Selection 2

Selection 3

 

Then I would have the client create a file with the filenames in that list

 

c:\data\filename1.txt

d:\otherdata\filename2.txt

c:\backup\filename3.txt

 

I would then explain to the user that this is a one to one relationship that

 

"Selection 1" would equate to c:\data\filename1.txt

"Selection 2" would equate to d:\otherdata\filename2.txt

"Selection 3" would equate to c:\backup\filename3.txt

 

That is the way would approach until the ability to dynamically load the UI fields programmatically.

 

I hope that helps.

 

Ah, Thanks.

 

This helped me indirectly.

 

So, now I will just ask the client to create files that are being used by the bot

and to store those files in the folder, where the bot looks for the file.

 

So, its okay now.

 

Thanks,

Faraz

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