User Profile

Collapse

Profile Sidebar

Collapse
mh121
mh121
Last Activity: Jan 8 '08, 08:07 AM
Joined: Aug 3 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • mh121
    replied to Is my web crawler being blocked?
    Thank you very much for your response. I have tried using urlopen through the URL directly with Google, but am finding that Google blocks this as well:

    z=urlopen("http ://www.google.com/search?q=link%3 A" +www-site+ "S&rls=com.micr osoft:*&ie=UTF-8&oe=UTF-8&startIndex=1& startPage=1")
    q=z.readlines()

    I've found an API called PyGoogle that may work, though it seems to be used...
    See more | Go to post

    Leave a comment:


  • mh121
    started a topic Is my web crawler being blocked?

    Is my web crawler being blocked?

    I am trying to write a web crawler (for academic research purposes) that grabs the number of links different websites/domain names have from other websites, as listed on Google (for example, to get the number of websites linking to YouTube, you could type into Google 'Link:YouTube.c om' and get 11,100). I have a list of websites in a spreadsheet and would like to be able to output the number of links for each website in the sheet.

    ...
    See more | Go to post
    Last edited by bartonc; Nov 19 '07, 10:45 AM. Reason: Added [CODE=python][/CODE] tags.

  • mh121
    replied to What is your OS and Python Version
    I'm on Python 2.5, Windows Vista, using IDLE
    See more | Go to post

    Leave a comment:


  • mh121
    started a topic Multiple Error Handling

    Multiple Error Handling

    Hi,

    I am trying to input a spreadsheet of possible domain names and output the length of the sourcecode of the webpage (if it exists). In testing this, I’ve come across a lot of errors, for example, when websites ask for username/password, take too slow to load, or no longer work. I am a newbie and am looking for help dealing with multiple errors.

    First, is the basic code setup below the best way to deal with multiple...
    See more | Go to post
    Last edited by bartonc; Aug 19 '07, 03:01 PM. Reason: Added [CODE=python][/CODE] tags.

  • mh121
    replied to Getting the size of sourcecode
    Thank you very much for your comments. What I meant for the destring function was actually just the str() function you provided. I tried out many of your suggestions today and, after trying out more tomorrow, if I continue to have questions, I will repost.
    See more | Go to post

    Leave a comment:


  • mh121
    started a topic Getting the size of sourcecode

    Getting the size of sourcecode

    Hello,

    I am trying to input a spreadsheet of possible domain names and output the length of the sourcecode of the webpage (if it exists). In doing this, I have three small questions (I am a newbie and apologize if the questions are simple):

    1. How do I convert the length of the page to a string? I have looked around the web for Python 'tostring' and found several individually created functions, but I tried a few and...
    See more | Go to post

  • mh121
    started a topic Simple question about double quotes

    Simple question about double quotes

    Hello,

    I want to add quotes to the front and of strings. That is, I want to turn a list of strings like

    Strawberry
    Chocolate
    Vanilla

    into the following list:

    "Strawberry "
    "Chocolate"
    "Vanilla"

    I have noticed that a command like
    string.replace( x,x[0],"\"\""+x[0])
    will put two double...
    See more | Go to post
No activity results to display
Show More
Working...