File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -145,6 +145,11 @@ try {
145145 // it then creates an iframe for the purchase
146146 await page . waitForSelector ( '#webPurchaseContainer iframe' ) ; // TODO needed?
147147 const iframe = page . frameLocator ( '#webPurchaseContainer iframe' ) ;
148+ // skip game if unavailable in region, https://github.com/vogler/free-games-claimer/issues/46 TODO check games for account's region
149+ if ( await iframe . locator ( ':has-text("unavailable in your region")' ) . count ( ) > 0 ) {
150+ console . error ( ' This product is unavailable in your region!' ) ;
151+ continue ;
152+ }
148153 await iframe . locator ( 'button:has-text("Place Order")' ) . click ( ) ;
149154
150155 // I Agree button is only shown for EU accounts! https://github.com/vogler/free-games-claimer/pull/7#issuecomment-1038964872
You can’t perform that action at this time.
0 commit comments