Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #54603 > unrolled thread

Directory Web Site

Started byworthingtonclinton@gmail.com
First post2013-09-22 18:14 -0700
Last post2013-09-23 17:14 +1000
Articles 6 — 4 participants

Back to article view | Back to comp.lang.python


Contents

  Directory Web Site worthingtonclinton@gmail.com - 2013-09-22 18:14 -0700
    Re: Directory Web Site Joel Goldstick <joel.goldstick@gmail.com> - 2013-09-22 21:36 -0400
      Re: Directory Web Site worthingtonclinton@gmail.com - 2013-09-22 19:02 -0700
    Re: Directory Web Site Dave Angel <davea@davea.name> - 2013-09-23 01:59 +0000
      Re: Directory Web Site worthingtonclinton@gmail.com - 2013-09-22 19:04 -0700
    Re: Directory Web Site Chris Angelico <rosuav@gmail.com> - 2013-09-23 17:14 +1000

#54603 — Directory Web Site

Fromworthingtonclinton@gmail.com
Date2013-09-22 18:14 -0700
SubjectDirectory Web Site
Message-ID<9c1aee48-7d5e-49d3-ae8c-b5d422cecb9b@googlegroups.com>
Was hoping to get some tips or advice on scripting a program that would sort through my many links on my directory website and print out to me the ones that are broken or no longer functioning so that I could fix or remove them from the site. Any help, ideas, advice will be greatly appreciated.

[toc] | [next] | [standalone]


#54606

FromJoel Goldstick <joel.goldstick@gmail.com>
Date2013-09-22 21:36 -0400
Message-ID<mailman.251.1379900194.18130.python-list@python.org>
In reply to#54603

[Multipart message — attachments visible in raw view] — view raw

On Sun, Sep 22, 2013 at 9:14 PM, <worthingtonclinton@gmail.com> wrote:

> Was hoping to get some tips or advice on scripting a program that would
> sort through my many links on my directory website and print out to me the
> ones that are broken or no longer functioning so that I could fix or remove
> them from the site. Any help, ideas, advice will be greatly appreciated.
> --
> https://mail.python.org/mailman/listinfo/python-list
>


This is a python list.  is this python related? what have you tried?  Do
you know about beautiful soup or requests?  they can help you I think.  You
really need to provide more information for any useful help here


-- 
Joel Goldstick
http://joelgoldstick.com

[toc] | [prev] | [next] | [standalone]


#54608

Fromworthingtonclinton@gmail.com
Date2013-09-22 19:02 -0700
Message-ID<b8754e72-bae8-4460-bf11-0acadaa94015@googlegroups.com>
In reply to#54606
On Sunday, September 22, 2013 9:36:25 PM UTC-4, Joel Goldstick wrote:
> On Sun, Sep 22, 2013 at 9:14 PM,  <worthingt...@gmail.com> wrote:
> 
> Was hoping to get some tips or advice on scripting a program that would sort through my many links on my directory website and print out to me the ones that are broken or no longer functioning so that I could fix or remove them from the site. Any help, ideas, advice will be greatly appreciated.
> 
> 
> --
> 
> https://mail.python.org/mailman/listinfo/python-list
> 
> 
> 
> 
> This is a python list.  is this python related? what have you tried?  Do you know about beautiful soup or requests?  they can help you I think.  You really need to provide more information for any useful help here
> 
> 
> 
> 
> -- 
> 
> 
> Joel Goldstick
> http://joelgoldstick.com

I'm trying to create a Python script that will search through the url links on my directory website and using a logic statement like, if: (how ever i would establish in python that the url is not broken) then return, elsif: (link is broken) then: print '%s is broken.' (%s being the name of the link). I want the program to perform this on all the links so that I can easily see which links are useless on my website so my page doesn't wind up functionally being difficult and clouded with broken links like every other crappy directory. 

[toc] | [prev] | [next] | [standalone]


#54607

FromDave Angel <davea@davea.name>
Date2013-09-23 01:59 +0000
Message-ID<mailman.252.1379901576.18130.python-list@python.org>
In reply to#54603
On 22/9/2013 21:14, worthingtonclinton@gmail.com wrote:

> Was hoping to get some tips or advice on scripting a program that would sort through my many links on my directory website and print out to me the ones that are broken or no longer functioning so that I could fix or remove them from the site. Any help, ideas, advice will be greatly appreciated.

Since it's your own website, the best answer is probably to process the
source to that site. Was it written by a python script?

Otherwise, if the site is reasonably correct (as most are not), then
Beautiful Soup is probably the place to start.

-- 
DaveA

[toc] | [prev] | [next] | [standalone]


#54609

Fromworthingtonclinton@gmail.com
Date2013-09-22 19:04 -0700
Message-ID<9a6970e2-c197-4c3d-8a5b-a898942a1652@googlegroups.com>
In reply to#54607
On Sunday, September 22, 2013 9:59:14 PM UTC-4, Dave Angel wrote:
> On 22/9/2013 21:14, worthingtonclinton@gmail.com wrote:
> 
> 
> 
> > Was hoping to get some tips or advice on scripting a program that would sort through my many links on my directory website and print out to me the ones that are broken or no longer functioning so that I could fix or remove them from the site. Any help, ideas, advice will be greatly appreciated.
> 
> 
> 
> Since it's your own website, the best answer is probably to process the
> 
> source to that site. Was it written by a python script?
> 
> 
> 
> Otherwise, if the site is reasonably correct (as most are not), then
> 
> Beautiful Soup is probably the place to start.
> 
> 
> 
> -- 
> 
> DaveA

Web page is in HTML created using Dreamweaver.

[toc] | [prev] | [next] | [standalone]


#54617

FromChris Angelico <rosuav@gmail.com>
Date2013-09-23 17:14 +1000
Message-ID<mailman.255.1379920473.18130.python-list@python.org>
In reply to#54603
On Mon, Sep 23, 2013 at 11:14 AM,  <worthingtonclinton@gmail.com> wrote:
> Was hoping to get some tips or advice on scripting a program that would sort through my many links on my directory website and print out to me the ones that are broken or no longer functioning so that I could fix or remove them from the site. Any help, ideas, advice will be greatly appreciated.
> --
> https://mail.python.org/mailman/listinfo/python-list

The easiest solution is probably a non-Python tool like wget. Search
the web for "link checker" or "href verifier" or words to that effect,
see what you find. This is an extremely common task, and I don't think
you need to write any code for it.

ChrisA

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web