Hi Guys,
I have just came into the wonderful world of Python. I am really enjoying it. Anyways I am having a query on Python. Here is my Query..

I have downloaded the python module Linkchecker. And you must be knowing that it dumps the website URLs of a specific site in a file. So what I want is, the links it will create for that specific website, I want Firefox to browse all those URL's once by one... So I want to know the code for it. Can anyone please help me regarding this issue?

For your convinience I am mentioning the URL of Linkchecker module ::

http://linkchecker.sourceforge.net/

Please help, I need it urgently.

Thanks,
Ping24

Hmm... I just downloaded the linkchecker module and tried to figure it out for myself, but I don't even know how to use it in my own scripts. Can you give me an example of the code you're using right now? Then I might be able to help with your problem. Thanks

Just install all the dependencies that are required to run this module. All are described in their installation hyperlink. And basically you can use this command which I am using else you can customize according to your own wish..
$ linkchecker -v http://abcd.com/ -r 6 -v > urls.html <Enter>

then use $cat urls.html to see the output the script made...

Oh, are you running this on Linux? I'm just using the default .exe that came on the download for Windows. My laptop (which has my Linux on it) is down at the moment, so I can't try it on there.
I was able to run it with my website and it told me all the links were fine and dandy, but I have no idea how to find the output file on the windows version. I'll try to look around for it and get back to you about it though.

if you are not able to install it then no problem, but the important thing is i need to read a text/html/csv file and from that i want that whatever urls are there in the file i want all those to be opened one by one via my firefox browser. And another thing is that it should close the browser after 2-3 seconds once it finishes opening that url...If anyone has any suggestions then please please speak out...

Thanks,
Ping24

Did you try this

import webbrowser
webbrowser.open(my_url)

?

Well I have already tried this one. This code opens a specific URL which parameter will be given in the braces. And you have to mention the URL which is to be opened there. But what I want is : there will be a text file in that directory where that py code will be present and in that txt file support there are 3 urls :
http://abc.com
http://def.com
http://ghi.com
so now the code should check for the presence of that text file and from that text file it should open those URLs which are mentioned in the text file one by one. And the most important thing while those urls will be opened in the browser then after 2-3 seconds that browser will be closed and another url should be opened next. I hope my question is clear to you now :)

Please let me know if you have any suggestions for doing its coding.

Thanks,
Ping24

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.