[Tutor] Accessing a Website

Fred G bayespokerguy at gmail.com
Thu Jul 12 20:03:42 CEST 2012


Hi--

My pseudocode is the following

new_dictionary = []
for name in file:
 #1) log into university account
 #2) go to website with data
 #3) type in search box: name
 #4) click search
 #5) if name is exact match with name of one of the hits:
    line.find("Code Number")
    #6) remove the number directly after "Code Number: " and stop at the
next space
new_dictionary[name] = Code Number

With the exception of step 6, I'm not quite sure how to do this in Python.
 Is it very complicated to write a script that logs onto a website that
requires a user name and password that I have, and then repeatedly enters
names and gets their associated id's that we want?  I used to work at a
cancer lab where we decided we couldn't do this kind of thing to search
PubMed, and that a human would be more accurate even though our criteria
was simply (is there survival data?).  I don't think that this has to be
the case here, but would greatly appreciate any guidance.

Thanks so much.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20120712/d69df69c/attachment.html>


More information about the Tutor mailing list