Closed PuruVJ closed 3 years ago
I'm okay with it, I don't think there is any other option if the tweet is older than 7 days old. But in terms of testing out code, could you think through it how the developer might run puppeteer code explicitly?
I'm thinking not just about puppeteer, but overall. Someone working on the EPUB should be able to run that flow without hitting the api (say) multiple times?
Every flow of the code if it can be exposed to developers easily, then it would be very nice. In this case we can test using older tweet. Maybe have a few npm scripts to go through each flow?
I say, we leave the -p there, but by default implement the switching. Most users simply would not care about the 7 day limit, they would just want their PDF.
I'm thinking not just about puppeteer, but overall. Someone working on the EPUB should be able to run that flow without hitting the api (say) multiple times?
I don't get it? Wouldn't all the rendering flows have to first go through fetching the tweets, with API or with puppeteer?
@PuruVJ Could you think about the flows and how we might make it easy for someone without the twitter api?
Switching to scraping if tweet is older is done by PR #727. Please take a look and approve it @johnjacobkenny and @PuruVJ . I have not done anything to the -p flag. Left it alone for now as discussed in the call.
Let's remove the need for the
-p
flag, and modify the code to switch to puppeteer if tweet is 7 days old.Very easy to implement, no more than 5 lines needed.
Should it be done now, @johnjacobkenny @Mira-Alf @proful?