python - Obtaining data from http search

Question

I'm using python to obtain some data from a catalog in internet, I'm using urllib2 and urllib. At this point I'm able to generate the url to begin the search, for instance to look for info for a thing called "202061048" the resulting url is:

https://archive.stsci.edu/k2/epic/search.php?id=202061048&action=Search

At this point I'm interested in the two variables RA and DEC (as described in the resulting page from the url above, RA=06 01 11.779 and DEC=+23 23 43.69).

My question is: How to do that? At this point I have used:

handler = urllib2.urlopen(get_url)
raw = handler.read()
print(raw[0:250000])

But I'm seeing only a bunch of code, and I'm not sure If under urllib2 is there something to obtain the info I'm looking (RA=06 01 11.779 and DEC=+23 23 43.69 values), and assign those values to a variable in python. Any advice will be greatly appreciated.


Show source
| url   | python   | http   | urllib2   | urllib   2017-01-06 01:01 0 Answers

Answers ( 0 )

◀ Go back