Last active
October 22, 2017 16:09
-
-
Save koraysaritas/21a0e5429a1be2366c41193fba287c5f to your computer and use it in GitHub Desktop.
ht
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from urllib import parse | |
from bs4 import BeautifulSoup | |
elem = '<a title="Sakura Sakura Onsen" href="https://www.google.com/maps?ll=31.8623230000,130.8571860000&spn=0.006130,0.009795&t=k&hl=en">3 BLUE</a>' | |
# ll | |
split = parse.urlsplit(elem) | |
qs = parse.parse_qs(split.query) | |
ll = qs['ll'][0].split(',') | |
# 3 BLUE | |
blue3 = BeautifulSoup(elem, "html.parser").find('a').text | |
ll.append(blue3) | |
print(" ".join(ll)) |
Author
koraysaritas
commented
Oct 22, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment