- 
                Notifications
    You must be signed in to change notification settings 
- Fork 0
80 twitter login #81
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
base: master
Are you sure you want to change the base?
80 twitter login #81
Conversation
…ndefined (reading itemContent)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pls take care
| responseUrl.match(/TweetDetail/g) && | ||
| headers['content-type'] && | ||
| headers['content-type'].includes('application/json') | ||
| responseUrl.match(/TweetDetail/g) || | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.
| console.log('process.env.TWITTER_USERNAME', process.env.TWITTER_USERNAME); | ||
| console.log('process.env.TWITTER_EMAIL', process.env.TWITTER_EMAIL); | ||
|  | ||
| if (!process.env.TWITTER_USERNAME) { | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please check all 3 in one go
|  | ||
| const loginPageButtons = await page.$$('[role="button"]'); | ||
|  | ||
| const loginPgaeNextButton = await findElementByTextContentAsync( | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.
| TWITTER_NEXT_BUTTON_TEXT_CONTENT, | ||
| ); | ||
|  | ||
| // console.log(nextButton); | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.
| } | ||
| } | ||
|  | ||
| const coockies = await page.cookies(); | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.
| const clearUrl = imgageUrl.includes('data:image/png;base64,') | ||
| ? imgageUrl.replace('data:image/png;base64,', '') | ||
| : imgageUrl; | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does it do?
|  | ||
| export const makeImageBase64UrlfromBuffer = (buffer: Buffer, filetype: string = 'png') => { | ||
| export const makeImageBase64UrlfromBuffer = (buffer: Buffer | null, filetype: string = 'png') => { | ||
| if (!buffer) return null; | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.
| export const getTrustedHashSum = (data: string | Buffer) => | ||
| enchex.stringify( | ||
| // @ts-ignore | ||
| sha256(CryptoJS.lib.WordArray.create(data)), | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RIG - Let it Rest in Git
| const author = tweetData?.user.screen_name ? tweetData?.user.screen_name : 'unknown autor'; | ||
| const author = parsedTweetData?.user.screen_name | ||
| ? parsedTweetData?.user.screen_name | ||
| : 'unknown autor'; | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo - author
| expect(res.ok).to.be.true; | ||
| expect(res.status).to.equal(200); | ||
| const { imageUrl, tweetdata, metadata } = JSON.parse(res.text); | ||
| //TODO: revise tests as handler changed | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can code the new test together!
No description provided.