Skip to content
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

empty doc.location() #245

Open
ukushu opened this issue Jun 2, 2023 · 1 comment
Open

empty doc.location() #245

ukushu opened this issue Jun 2, 2023 · 1 comment

Comments

@ukushu
Copy link

ukushu commented Jun 2, 2023

I'm trying to get target url from google's "I'm feeling lucky" request

as example I have an url:

https://www.google.com/search?q=youtube+portal+2+walkthrough+no+commentary&btnI

I'm doing request via SwiftSoup. I see html() of youtube site. So SwiftSoup doing all right.

BUT!

    guard let doc: Document = getHTMLDoc(from: queryUrl) else { return nil }

    let url2 = doc.location() // "" (empty)
    let url = doc.getBaseUri() // "" (empty)

so SwiftSoup can absolutely correctly get html, but don't know where from this html was taken.

Absolutely strange behavior.

@aehlke
Copy link
Collaborator

aehlke commented Dec 11, 2024

please submit a PR to add this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants