work on qm
This commit is contained in:
parent
ca1f658be6
commit
3fb9df425c
5 changed files with 93 additions and 113 deletions
|
|
@ -2,8 +2,9 @@
|
|||
* QM Session Manager - Centralized session state management
|
||||
*/
|
||||
|
||||
import type { QMSession } from './types';
|
||||
import { getRandomUserAgent } from '@stock-bot/services/http';
|
||||
import { QM_SESSION_IDS, SESSION_CONFIG } from './config';
|
||||
import type { QMSession } from './types';
|
||||
|
||||
export class QMSessionManager {
|
||||
private static instance: QMSessionManager | null = null;
|
||||
|
|
@ -83,6 +84,17 @@ export class QMSessionManager {
|
|||
return removedCount;
|
||||
}
|
||||
|
||||
getQmHeaders(): Record<string, string> {
|
||||
return {
|
||||
'User-Agent': getRandomUserAgent(),
|
||||
Accept: '*/*',
|
||||
'Accept-Language': 'en',
|
||||
'Sec-Fetch-Mode': 'cors',
|
||||
Origin: 'https://www.quotemedia.com',
|
||||
Referer: 'https://www.quotemedia.com/',
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if more sessions are needed for a session ID
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue