Skip to content

empty doc.location() #245

Open
Open
@ukushu

Description

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.

Activity

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

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions