-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
List Selected Stations with Longitude / Latitude #36
Conversation
add list_selected_stations() to get the list of selected stations
list_selected_stations() returns stations with Lon/Lat.
try/except for `parser`.
@yasuit21 Thanks for your contribution! It looks like a useful feature. I think the feature should be merged into |
Used the standard lib `html.parser` instead of beautifulsoup4.
Thanks. I have changed as below:
No dependency is added. Would you check? |
@yasuit21 Your changes work well. The CI jobs fail because your fork can't access some secret settings in this repository. Don't worry. I'll run the tests locally. I have two more suggestions:
|
Rename and change of `get_selected_stations()` 1. Rename `get_selected_stations()` to `_get_selected_stations()` and `list_selected_stations()` to `get_selected_stations()`. 2. `get_selected_stations()` returns a list of `Station` and `print()` shows the number of selected stations.
@seisman Thank you for suggestions.
|
Background
Client.get_seleced_stations()
only returns the number of selected stations, not the station info.Client.list_selected_stations()
to show selected stations with Lon/Lat data!Feature
Client.list_selected_stations()
returns a dict containing stations as keys.'longitude'
and'latitude'
as keys.len()
returns the number of selected stations, the same feature toClient.get_seleced_stations()
.Example
Note
beautifulsoup4
to run this function (I did not touch setup.py and requirements.txt)lxml
is installed, as the default parser. If not,html.parser
is used in BeautifulSoup.get_seleced_stations()
?