Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. COAh, in the actual code, I do this, I just left it out for clarity in the post. Thank you, though. The page types all have the same function, so the logic that I use to deal with each page is identical-- I don't have to instruct the program to do different things-- just that the tags that are used to get things from each individual page is particular to each page.
      singulars
    2. COYup, which is one of the main reasons to use object oriented design. You get a page object back from `navigate_to`, all page objects have `get_data`, so you just call the same method on each page object. `navigate_to` is the only method that has to know the difference between the objects, the caller just cares that the returned pages have `get_data`. You import all the page objects in to the module with `navigate_to`, then have conditional logic there to create the correct object at runtime. No conditional imports.
      singulars
    3. COI have it set up so that the user provides the website that they want to scrape, and depending on the user import, a different module is loaded. in each respective module, i have a function called `go_search` which has the code that runs a search using whatever search API that particular website uses (or in some cases, simply finds the search box and sends keys, whichever is faster). In either case, the result of the `go_search` function is the same, but because I'm dealing with completely different websites, trying to abstract a layer that works with any website is near impossible (for me).
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload