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

linkedin - likePostsFrom(...names) #55

Closed
mrWh1te opened this issue Aug 24, 2020 · 1 comment
Closed

linkedin - likePostsFrom(...names) #55

mrWh1te opened this issue Aug 24, 2020 · 1 comment
Labels
botaction npm Packaging, Releases, Dist related proposal New feature or change

Comments

@mrWh1te
Copy link
Owner

mrWh1te commented Aug 24, 2020

  • research methods for auth checking (local storage, idb, cookies, etc)
  • isGuest, isLoggedIn
  • likePostsFrom(...names)
@mrWh1te mrWh1te added proposal New feature or change npm Packaging, Releases, Dist related botaction labels Aug 24, 2020
mrWh1te added a commit that referenced this issue Aug 26, 2020
- issue #55
- explored linkedin web app for signals in storage distinguishing user
  auth (guest vs logged in)
mrWh1te added a commit that referenced this issue Aug 26, 2020
- like uses errors()() in case the selector doesn't find anything, the
  promise of page.click() will reject
- now getFeedPosts() with default function to filter Promoted content
  from returned scraped posts, unless overridenn
- issue #55
mrWh1te added a commit that referenced this issue Aug 27, 2020
* Moved wait() into Navigation

- moved sleep() into helpers/navigation
- deleted helpers/utilties
- consolidated tests (tests related were moved into
  */navigation.spec.ts)
- Resolve issue #51

* Compose screenshotAll() BotAction

- Resolves issue #50

* LinkedIn ConditionalBotAction isGuest & isLoggedIn

- issue #55 

* postIsAuthoredByAPerson

- potential concept, with notes on using fuzzy string matching to make
  function more resilient to change ie middle-initials, nicknames, etc

* LinkedIn like() and enhanced getFeedPosts

- like uses errors()() in case the selector doesn't find anything, the
  promise of page.click() will reject
- now getFeedPosts() with default function to filter Promoted content
  from returned scraped posts, unless overridenn
- issue #55

* like() does not toggle

- like() clicks Like button of Post if button not pressed, since it will
  error with wrong selector given an attribute value is different when
  pressed or not

* LinkedIn Navigation BotAction's & Like enhance

- like() does not toggle, because part of the selector attribute value
  changes based on selected status, so it will error if liked already
   - error is caught
- navigation botaction's with configuration to help navigate the web app

* Clean Up likeAllFrom()

- no need for array, cleaner syntax

* Feed polish

- linkedin example needs fleshing out to verify the functionality

* Code Quality

- from master lgtm review

* LinkedIn Example

- fleshed out login flow with working session restoration via cookies
- fixed a selector bug with grabbing posts (was grabbing articles within
  posts too for post content that is comment of someone you follow)
- resolved bug in $$ BotAction where a pipe object was being used as the
  injected parser

* Fixed Tests

- added a test case for using toString() on an object and when an object
  does not have it

* LinkedIn Selectors

- reusable selectors separated out
- going to leave likeAllFrom() since it needs additional work not
  originally scoped of handle various Feed Posts' types
  - might schedule that work for once switchPipe()() and case()() are
    complete

* CHANGELOG

- starting at v2.0.0
@mrWh1te
Copy link
Owner Author

mrWh1te commented Sep 9, 2020

in the future, probably in the instagram bot work, ill add scrolling and digestion of new feed posts to make the bot auto scroll and dynamically like posts like a regular person based on criteria provided

as of now, the likeArticlesFrom or likeAllFrom in LinkedIn digest only the first 15'ish posts of the page and once those are processed it will not process any further, including new posts loaded during scroll.

simply, it's not a priority atm, but on the radar

mrWh1te added a commit that referenced this issue Sep 9, 2020
* pipeCases()() and likeAllFrom() #61 #55 
- pipeCases()() like pipeCase()() except ALL cases must match for it to
  return a MatchesSignal with matches and pipeValue
- LinkedIn likeAllFrom(...peopleNames) uses switchPipe() and
  pipeCase()() to test post for type
* Renamed MatchesSignal -> CasesSignal + new prop `conditionPass`
- added `conditionPass` property to CasesSignal so it can return
  matching cases while still presenting itself as not ran since
  the overall condition failed (did not pass)
* pipeCases()() unit-tests
* pipeCases()() & pipeCase()() abortlinesignal tweak
- similar to switchPipe handling abort line signals, it takes multiple
  abort assembledLines to fully abort out of pipeCase(s) cz its 1 to
  abort the line assembled and a second to abort the CasesSignal return
  versus an AbortLineSignal return
- if pipeValue returned, it was abort(2)'s pipeValue
* pipeAbort(), house cleaning, conditionalCallbacks
* pipeCase(s) specifies type CaseValues for callback of testable value
* pipeAbort() supports conditional callback or a pipevalue to test
  against pipevalue and if true, then return AbortLineSignal(1,
  pipeValue?)
* linkedin example using likeArticlesFrom()
- going beyond function scope but to show a more detailed example on how
  a feed could be processed with switchPipe()()
* introduced new botaction scrollTo() which includes a static wait of
  2.5 seconds for the scroll to finish (add more if you need more)
- this update includes the ability to let the LinkedIn app lazily load
  each post if it hasnt been loaded yet, with a special check
- complete but not recently tested likeArticle() functionality since using
  fictional character names
* helpers/navigation unit-testing
* helpers/cases unit-test
* navigation/actions unit-test scrollTo()
* evaluate() botaction with integration test
@mrWh1te mrWh1te closed this as completed Sep 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
botaction npm Packaging, Releases, Dist related proposal New feature or change
Projects
None yet
Development

No branches or pull requests

1 participant