@the-convocation/twitter-scraper 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.commitlintrc +5 -0
- package/.eslintcache +1 -0
- package/.eslintrc.js +24 -0
- package/.gitattributes +78 -0
- package/.prettierignore +2 -0
- package/.prettierrc +5 -0
- package/LICENSE +21 -0
- package/README.md +26 -0
- package/dist/api.js +77 -0
- package/dist/api.js.map +1 -0
- package/dist/auth.js +119 -0
- package/dist/auth.js.map +1 -0
- package/dist/profile.js +103 -0
- package/dist/profile.js.map +1 -0
- package/dist/scraper.js +153 -0
- package/dist/scraper.js.map +1 -0
- package/dist/search.js +84 -0
- package/dist/search.js.map +1 -0
- package/dist/timeline-async.js +59 -0
- package/dist/timeline-async.js.map +1 -0
- package/dist/timeline.js +228 -0
- package/dist/timeline.js.map +1 -0
- package/dist/trends.js +46 -0
- package/dist/trends.js.map +1 -0
- package/dist/tweets.js +59 -0
- package/dist/tweets.js.map +1 -0
- package/dist/types/api.d.ts +16 -0
- package/dist/types/api.d.ts.map +1 -0
- package/dist/types/auth.d.ts +55 -0
- package/dist/types/auth.d.ts.map +1 -0
- package/dist/types/profile.d.ts +67 -0
- package/dist/types/profile.d.ts.map +1 -0
- package/dist/types/scraper.d.ts +102 -0
- package/dist/types/scraper.d.ts.map +1 -0
- package/dist/types/search.d.ts +19 -0
- package/dist/types/search.d.ts.map +1 -0
- package/dist/types/timeline-async.d.ts +15 -0
- package/dist/types/timeline-async.d.ts.map +1 -0
- package/dist/types/timeline.d.ts +154 -0
- package/dist/types/timeline.d.ts.map +1 -0
- package/dist/types/trends.d.ts +3 -0
- package/dist/types/trends.d.ts.map +1 -0
- package/dist/types/tweets.d.ts +52 -0
- package/dist/types/tweets.d.ts.map +1 -0
- package/package.json +52 -0
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { RequestApiResult } from './api';
|
|
2
|
+
import { TwitterGuestAuth } from './auth';
|
|
3
|
+
export interface LegacyUserRaw {
|
|
4
|
+
created_at?: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
entities?: {
|
|
7
|
+
url?: {
|
|
8
|
+
urls?: {
|
|
9
|
+
expanded_url?: string;
|
|
10
|
+
}[];
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
favourites_count?: number;
|
|
14
|
+
followers_count?: number;
|
|
15
|
+
friends_count?: number;
|
|
16
|
+
id_str?: string;
|
|
17
|
+
listed_count?: number;
|
|
18
|
+
name?: string;
|
|
19
|
+
location: string;
|
|
20
|
+
pinned_tweet_ids_str?: string[];
|
|
21
|
+
profile_banner_url?: string;
|
|
22
|
+
profile_image_url_https?: string;
|
|
23
|
+
protected?: boolean;
|
|
24
|
+
screen_name?: string;
|
|
25
|
+
statuses_count?: number;
|
|
26
|
+
verified?: boolean;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* A parsed profile object.
|
|
30
|
+
*/
|
|
31
|
+
export interface Profile {
|
|
32
|
+
avatar?: string;
|
|
33
|
+
banner?: string;
|
|
34
|
+
biography?: string;
|
|
35
|
+
birthday?: string;
|
|
36
|
+
followersCount?: number;
|
|
37
|
+
followingCount?: number;
|
|
38
|
+
friendsCount?: number;
|
|
39
|
+
isPrivate?: boolean;
|
|
40
|
+
isVerified?: boolean;
|
|
41
|
+
joined?: Date;
|
|
42
|
+
likesCount?: number;
|
|
43
|
+
listedCount?: number;
|
|
44
|
+
location: string;
|
|
45
|
+
name?: string;
|
|
46
|
+
pinnedTweetIds?: string[];
|
|
47
|
+
tweetsCount?: number;
|
|
48
|
+
url?: string;
|
|
49
|
+
userId?: string;
|
|
50
|
+
username?: string;
|
|
51
|
+
website?: string;
|
|
52
|
+
}
|
|
53
|
+
export interface UserRaw {
|
|
54
|
+
data: {
|
|
55
|
+
user: {
|
|
56
|
+
rest_id?: string;
|
|
57
|
+
legacy: LegacyUserRaw;
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
errors?: {
|
|
61
|
+
message: string;
|
|
62
|
+
}[];
|
|
63
|
+
}
|
|
64
|
+
export declare function parseProfile(user: LegacyUserRaw): Profile;
|
|
65
|
+
export declare function getProfile(username: string, auth: TwitterGuestAuth): Promise<RequestApiResult<Profile>>;
|
|
66
|
+
export declare function getUserIdByScreenName(screenName: string, auth: TwitterGuestAuth): Promise<RequestApiResult<string>>;
|
|
67
|
+
//# sourceMappingURL=profile.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profile.d.ts","sourceRoot":"","sources":["../../src/profile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,gBAAgB,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAE1C,MAAM,WAAW,aAAa;IAC5B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE;QACT,GAAG,CAAC,EAAE;YACJ,IAAI,CAAC,EAAE;gBACL,YAAY,CAAC,EAAE,MAAM,CAAC;aACvB,EAAE,CAAC;SACL,CAAC;KACH,CAAC;IACF,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;IAChC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;C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EAClB,IAAI,EAAE,gBAAgB,GACrB,OAAO,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC,CAyBnC"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { Profile } from './profile';
|
|
2
|
+
import { SearchMode } from './search';
|
|
3
|
+
import { QueryProfilesResponse, QueryTweetsResponse } from './timeline';
|
|
4
|
+
import { Tweet } from './tweets';
|
|
5
|
+
/**
|
|
6
|
+
* An interface to Twitter's undocumented API.
|
|
7
|
+
* Reusing Scraper objects is recommended to minimize the time spent authenticating unnecessarily.
|
|
8
|
+
*/
|
|
9
|
+
export declare class Scraper {
|
|
10
|
+
private auth;
|
|
11
|
+
private authTrends;
|
|
12
|
+
/**
|
|
13
|
+
* Creates a new Scraper object. Scrapers maintain their own guest tokens for Twitter's internal API.
|
|
14
|
+
* Reusing Scraper objects is recommended to minimize the time spent authenticating unnecessarily.
|
|
15
|
+
*/
|
|
16
|
+
constructor();
|
|
17
|
+
/**
|
|
18
|
+
* Fetches a Twitter profile.
|
|
19
|
+
* @param username The Twitter username of the profile to fetch, without an `@` at the beginning.
|
|
20
|
+
* @returns The requested profile.
|
|
21
|
+
*/
|
|
22
|
+
getProfile(username: string): Promise<Profile>;
|
|
23
|
+
/**
|
|
24
|
+
* Fetches the user ID corresponding to the provided screen name.
|
|
25
|
+
* @param screenName The Twitter screen name of the profile to fetch.
|
|
26
|
+
* @returns The ID of the corresponding account.
|
|
27
|
+
*/
|
|
28
|
+
getUserIdByScreenName(screenName: string): Promise<string>;
|
|
29
|
+
/**
|
|
30
|
+
* Fetches tweets from Twitter.
|
|
31
|
+
* @param query The search query. Any Twitter-compatible query format can be used.
|
|
32
|
+
* @param maxTweets The maximum number of tweets to return.
|
|
33
|
+
* @param includeReplies Whether or not replies should be included in the response.
|
|
34
|
+
* @param searchMode The category filter to apply to the search. Defaults to `Top`.
|
|
35
|
+
* @returns An async generator of tweets matching the provided filters.
|
|
36
|
+
*/
|
|
37
|
+
searchTweets(query: string, maxTweets: number, includeReplies: boolean, searchMode?: SearchMode): AsyncGenerator<Tweet>;
|
|
38
|
+
/**
|
|
39
|
+
* Fetches profiles from Twitter.
|
|
40
|
+
* @param query The search query. Any Twitter-compatible query format can be used.
|
|
41
|
+
* @param maxProfiles The maximum number of profiles to return.
|
|
42
|
+
* @returns An async generator of tweets matching the provided filters.
|
|
43
|
+
*/
|
|
44
|
+
searchProfiles(query: string, maxProfiles: number): AsyncGenerator<Profile>;
|
|
45
|
+
/**
|
|
46
|
+
* Fetches tweets from Twitter.
|
|
47
|
+
* @param query The search query. Any Twitter-compatible query format can be used.
|
|
48
|
+
* @param maxTweets The maximum number of tweets to return.
|
|
49
|
+
* @param includeReplies Whether or not replies should be included in the response.
|
|
50
|
+
* @param searchMode The category filter to apply to the search. Defaults to `Top`.
|
|
51
|
+
* @param cursor The search cursor, which can be passed into further requests for more results.
|
|
52
|
+
* @returns A page of results, containing a cursor that can be used in further requests.
|
|
53
|
+
*/
|
|
54
|
+
fetchSearchTweets(query: string, maxTweets: number, includeReplies: boolean, searchMode: SearchMode, cursor?: string): Promise<QueryTweetsResponse>;
|
|
55
|
+
/**
|
|
56
|
+
* Fetches profiles from Twitter.
|
|
57
|
+
* @param query The search query. Any Twitter-compatible query format can be used.
|
|
58
|
+
* @param maxProfiles The maximum number of profiles to return.
|
|
59
|
+
* @param cursor The search cursor, which can be passed into further requests for more results.
|
|
60
|
+
* @returns A page of results, containing a cursor that can be used in further requests.
|
|
61
|
+
*/
|
|
62
|
+
fetchSearchProfiles(query: string, maxProfiles: number, cursor?: string): Promise<QueryProfilesResponse>;
|
|
63
|
+
/**
|
|
64
|
+
* Fetches the current trends from Twitter.
|
|
65
|
+
* @returns The current list of trends.
|
|
66
|
+
*/
|
|
67
|
+
getTrends(): Promise<string[]>;
|
|
68
|
+
/**
|
|
69
|
+
* Fetches tweets from a Twitter user.
|
|
70
|
+
* @param user The user whose tweets should be returned.
|
|
71
|
+
* @param maxTweets The maximum number of tweets to return.
|
|
72
|
+
* @param includeReplies Whether or not to include tweet replies.
|
|
73
|
+
* @returns An async generator of tweets from the provided user.
|
|
74
|
+
*/
|
|
75
|
+
getTweets(user: string, maxTweets: number, includeReplies: boolean): AsyncGenerator<Tweet>;
|
|
76
|
+
/**
|
|
77
|
+
* Fetches a single tweet.
|
|
78
|
+
* @param id The ID of the tweet to fetch.
|
|
79
|
+
* @param includeReplies Whether or not to include tweet replies.
|
|
80
|
+
* @returns The request tweet, or `null` if it couldn't be fetched.
|
|
81
|
+
*/
|
|
82
|
+
getTweet(id: string, includeReplies: boolean): Promise<Tweet | null>;
|
|
83
|
+
/**
|
|
84
|
+
* Returns if the scraper has a guest token. The token may not be valid.
|
|
85
|
+
* @returns `true` if the scraper has a guest token; otherwise `false`.
|
|
86
|
+
*/
|
|
87
|
+
hasGuestToken(): boolean;
|
|
88
|
+
/**
|
|
89
|
+
* Sets the optional cookie to be used in requests.
|
|
90
|
+
* @param cookie The cookie to be used in requests.
|
|
91
|
+
* @returns This scraper instance.
|
|
92
|
+
*/
|
|
93
|
+
withCookie(cookie: string): Scraper;
|
|
94
|
+
/**
|
|
95
|
+
* Sets the optional CSRF token to be used in requests.
|
|
96
|
+
* @param token The CSRF token to be used in requests.
|
|
97
|
+
* @returns This scraper instance.
|
|
98
|
+
*/
|
|
99
|
+
withXCsrfToken(token: string): Scraper;
|
|
100
|
+
private handleResponse;
|
|
101
|
+
}
|
|
102
|
+
//# sourceMappingURL=scraper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scraper.d.ts","sourceRoot":"","sources":["../../src/scraper.ts"],"names":[],"mappings":"AAEA,OAAO,EAAqC,OAAO,EAAE,MAAM,WAAW,CAAC;AACvE,OAAO,EAGL,UAAU,EAGX,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAExE,OAAO,EAAuB,KAAK,EAAE,MAAM,UAAU,CAAC;AAEt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;OAIG;IACI,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO;IAM1C;;;;OAIG;IACI,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;IAM7C,OAAO,CAAC,cAAc;CAOvB"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { TwitterGuestAuth } from './auth';
|
|
2
|
+
import { Profile } from './profile';
|
|
3
|
+
import { QueryProfilesResponse, QueryTweetsResponse } from './timeline';
|
|
4
|
+
import { Tweet } from './tweets';
|
|
5
|
+
/**
|
|
6
|
+
* The categories that can be used in Twitter searches.
|
|
7
|
+
*/
|
|
8
|
+
export declare enum SearchMode {
|
|
9
|
+
Top = 0,
|
|
10
|
+
Latest = 1,
|
|
11
|
+
Photos = 2,
|
|
12
|
+
Videos = 3,
|
|
13
|
+
Users = 4
|
|
14
|
+
}
|
|
15
|
+
export declare function searchTweets(query: string, maxTweets: number, includeReplies: boolean, searchMode: SearchMode, auth: TwitterGuestAuth): AsyncGenerator<Tweet>;
|
|
16
|
+
export declare function searchProfiles(query: string, maxProfiles: number, auth: TwitterGuestAuth): AsyncGenerator<Profile>;
|
|
17
|
+
export declare function fetchSearchTweets(query: string, maxTweets: number, includeReplies: boolean, searchMode: SearchMode, auth: TwitterGuestAuth, cursor?: string): Promise<QueryTweetsResponse>;
|
|
18
|
+
export declare function fetchSearchProfiles(query: string, maxProfiles: number, auth: TwitterGuestAuth, cursor?: string): Promise<QueryProfilesResponse>;
|
|
19
|
+
//# sourceMappingURL=search.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../src/search.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAGL,qBAAqB,EACrB,mBAAmB,EAEpB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEjC;;GAEG;AACH,oBAAY,UAAU;IACpB,GAAG,IAAA;IACH,MAAM,IAAA;IACN,MAAM,IAAA;IACN,MAAM,IAAA;IACN,KAAK,IAAA;CACN;AAED,wBAAgB,YAAY,CAC1B,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,MAAM,EACjB,cAAc,EAAE,OAAO,EACvB,UAAU,EAAE,UAAU,EACtB,IAAI,EAAE,gBAAgB,GACrB,cAAc,CAAC,KAAK,CAAC,CAIvB;AAED,wBAAgB,cAAc,CAC5B,KAAK,EAAE,MAAM,EACb,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE,gBAAgB,GACrB,cAAc,CAAC,OAAO,CAAC,CAIzB;AAED,wBAAsB,iBAAiB,CACrC,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,MAAM,EACjB,cAAc,EAAE,OAAO,EACvB,UAAU,EAAE,UAAU,EACtB,IAAI,EAAE,gBAAgB,EACtB,MAAM,CAAC,EAAE,MAAM,GACd,OAAO,CAAC,mBAAmB,CAAC,CAW9B;AAED,wBAAsB,mBAAmB,CACvC,KAAK,EAAE,MAAM,EACb,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE,gBAAgB,EACtB,MAAM,CAAC,EAAE,MAAM,GACd,OAAO,CAAC,qBAAqB,CAAC,CAWhC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Profile } from './profile';
|
|
2
|
+
import { Tweet } from './tweets';
|
|
3
|
+
export interface FetchProfilesResponse {
|
|
4
|
+
profiles: Profile[];
|
|
5
|
+
next?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare type FetchProfiles = (query: string, maxProfiles: number, cursor: string | undefined) => Promise<FetchProfilesResponse>;
|
|
8
|
+
export interface FetchTweetsResponse {
|
|
9
|
+
tweets: Tweet[];
|
|
10
|
+
next?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare type FetchTweets = (query: string, maxTweets: number, cursor: string | undefined) => Promise<FetchTweetsResponse>;
|
|
13
|
+
export declare function getUserTimeline(query: string, maxProfiles: number, fetchFunc: FetchProfiles): AsyncGenerator<Profile>;
|
|
14
|
+
export declare function getTweetTimeline(query: string, maxTweets: number, fetchFunc: FetchTweets): AsyncGenerator<Tweet>;
|
|
15
|
+
//# sourceMappingURL=timeline-async.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"timeline-async.d.ts","sourceRoot":"","sources":["../../src/timeline-async.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEjC,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,oBAAY,aAAa,GAAG,CAC1B,KAAK,EAAE,MAAM,EACb,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,MAAM,GAAG,SAAS,KACvB,OAAO,CAAC,qBAAqB,CAAC,CAAC;AAEpC,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,KAAK,EAAE,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,oBAAY,WAAW,GAAG,CACxB,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,GAAG,SAAS,KACvB,OAAO,CAAC,mBAAmB,CAAC,CAAC;AAElC,wBAAuB,eAAe,CACpC,KAAK,EAAE,MAAM,EACb,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,aAAa,GACvB,cAAc,CAAC,OAAO,CAAC,CA2BzB;AAED,wBAAuB,gBAAgB,CACrC,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,WAAW,GACrB,cAAc,CAAC,KAAK,CAAC,CA2BvB"}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { LegacyUserRaw, Profile } from './profile';
|
|
2
|
+
import { PlaceRaw, Tweet } from './tweets';
|
|
3
|
+
export interface Hashtag {
|
|
4
|
+
text?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface TimelineMediaBasicRaw {
|
|
7
|
+
media_url_https?: string;
|
|
8
|
+
type?: string;
|
|
9
|
+
url?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface TimelineUrlBasicRaw {
|
|
12
|
+
expanded_url?: string;
|
|
13
|
+
url?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface ExtSensitiveMediaWarningRaw {
|
|
16
|
+
adult_content?: boolean;
|
|
17
|
+
graphic_violence?: boolean;
|
|
18
|
+
other?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export interface VideoVariant {
|
|
21
|
+
bitrate?: number;
|
|
22
|
+
url?: string;
|
|
23
|
+
}
|
|
24
|
+
export interface VideoInfo {
|
|
25
|
+
variants?: VideoVariant[];
|
|
26
|
+
}
|
|
27
|
+
export interface TimelineMediaExtendedRaw {
|
|
28
|
+
id_str?: string;
|
|
29
|
+
media_url_https?: string;
|
|
30
|
+
ext_sensitive_media_warning?: ExtSensitiveMediaWarningRaw;
|
|
31
|
+
type?: string;
|
|
32
|
+
url?: string;
|
|
33
|
+
video_info?: VideoInfo;
|
|
34
|
+
}
|
|
35
|
+
export interface TimelineTweetRaw {
|
|
36
|
+
conversation_id_str?: string;
|
|
37
|
+
created_at?: string;
|
|
38
|
+
favorite_count?: number;
|
|
39
|
+
full_text?: string;
|
|
40
|
+
entities?: {
|
|
41
|
+
hashtags?: Hashtag[];
|
|
42
|
+
media?: TimelineMediaBasicRaw[];
|
|
43
|
+
urls?: TimelineUrlBasicRaw[];
|
|
44
|
+
};
|
|
45
|
+
extended_entities?: {
|
|
46
|
+
media?: TimelineMediaExtendedRaw[];
|
|
47
|
+
};
|
|
48
|
+
in_reply_to_status_id_str?: string;
|
|
49
|
+
place?: PlaceRaw;
|
|
50
|
+
reply_count?: number;
|
|
51
|
+
retweet_count?: number;
|
|
52
|
+
retweeted_status_id_str?: string;
|
|
53
|
+
quoted_status_id_str?: string;
|
|
54
|
+
time?: string;
|
|
55
|
+
user_id_str?: string;
|
|
56
|
+
}
|
|
57
|
+
export interface TimelineGlobalObjectsRaw {
|
|
58
|
+
tweets?: {
|
|
59
|
+
[key: string]: TimelineTweetRaw | undefined;
|
|
60
|
+
};
|
|
61
|
+
users?: {
|
|
62
|
+
[key: string]: LegacyUserRaw | undefined;
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
export interface TimelineDataRawCursor {
|
|
66
|
+
value?: string;
|
|
67
|
+
cursorType?: string;
|
|
68
|
+
}
|
|
69
|
+
export interface TimelineDataRawEntity {
|
|
70
|
+
id?: string;
|
|
71
|
+
}
|
|
72
|
+
export interface TimelineDataRawModuleItem {
|
|
73
|
+
clientEventInfo?: {
|
|
74
|
+
details?: {
|
|
75
|
+
guideDetails?: {
|
|
76
|
+
transparentGuideDetails?: {
|
|
77
|
+
trendMetadata?: {
|
|
78
|
+
trendName?: string;
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
export interface TimelineDataRawAddEntry {
|
|
86
|
+
content?: {
|
|
87
|
+
item?: {
|
|
88
|
+
content?: {
|
|
89
|
+
tweet?: TimelineDataRawEntity;
|
|
90
|
+
user?: TimelineDataRawEntity;
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
operation?: {
|
|
94
|
+
cursor?: TimelineDataRawCursor;
|
|
95
|
+
};
|
|
96
|
+
timelineModule?: {
|
|
97
|
+
items?: {
|
|
98
|
+
item?: TimelineDataRawModuleItem;
|
|
99
|
+
}[];
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
export interface TimelineDataRawPinEntry {
|
|
104
|
+
content?: {
|
|
105
|
+
item?: {
|
|
106
|
+
content?: {
|
|
107
|
+
tweet?: TimelineDataRawEntity;
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
export interface TimelineDataRawReplaceEntry {
|
|
113
|
+
content?: {
|
|
114
|
+
operation?: {
|
|
115
|
+
cursor?: TimelineDataRawCursor;
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
export interface TimelineDataRawInstruction {
|
|
120
|
+
addEntries?: {
|
|
121
|
+
entries?: TimelineDataRawAddEntry[];
|
|
122
|
+
};
|
|
123
|
+
pinEntry?: {
|
|
124
|
+
entry?: TimelineDataRawPinEntry;
|
|
125
|
+
};
|
|
126
|
+
replaceEntry?: {
|
|
127
|
+
entry?: TimelineDataRawReplaceEntry;
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
export interface TimelineDataRaw {
|
|
131
|
+
instructions?: TimelineDataRawInstruction[];
|
|
132
|
+
}
|
|
133
|
+
export interface TimelineRaw {
|
|
134
|
+
globalObjects?: TimelineGlobalObjectsRaw;
|
|
135
|
+
timeline?: TimelineDataRaw;
|
|
136
|
+
}
|
|
137
|
+
export declare function parseTweet(timeline: TimelineRaw, id: string): Tweet | null;
|
|
138
|
+
/**
|
|
139
|
+
* A paginated tweets API response. The `next` field can be used to fetch the next page of results.
|
|
140
|
+
*/
|
|
141
|
+
export interface QueryTweetsResponse {
|
|
142
|
+
tweets: Tweet[];
|
|
143
|
+
next?: string;
|
|
144
|
+
}
|
|
145
|
+
export declare function parseTweets(timeline: TimelineRaw): QueryTweetsResponse;
|
|
146
|
+
/**
|
|
147
|
+
* A paginated profiles API response. The `next` field can be used to fetch the next page of results.
|
|
148
|
+
*/
|
|
149
|
+
export interface QueryProfilesResponse {
|
|
150
|
+
profiles: Profile[];
|
|
151
|
+
next?: string;
|
|
152
|
+
}
|
|
153
|
+
export declare function parseUsers(timeline: TimelineRaw): QueryProfilesResponse;
|
|
154
|
+
//# sourceMappingURL=timeline.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
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ED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,KAAK,EAAE,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,wBAAgB,WAAW,CAAC,QAAQ,EAAE,WAAW,GAAG,mBAAmB,CA2CtE;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,wBAAgB,UAAU,CAAC,QAAQ,EAAE,WAAW,GAAG,qBAAqB,CAwCvE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trends.d.ts","sourceRoot":"","sources":["../../src/trends.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAG1C,wBAAsB,SAAS,CAAC,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CA0CzE"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { TwitterGuestAuth } from './auth';
|
|
2
|
+
import { QueryTweetsResponse } from './timeline';
|
|
3
|
+
export interface Video {
|
|
4
|
+
id: string;
|
|
5
|
+
preview: string;
|
|
6
|
+
url?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface PlaceRaw {
|
|
9
|
+
id?: string;
|
|
10
|
+
place_type?: string;
|
|
11
|
+
name?: string;
|
|
12
|
+
full_name?: string;
|
|
13
|
+
country_code?: string;
|
|
14
|
+
country?: string;
|
|
15
|
+
bounding_box?: {
|
|
16
|
+
type?: string;
|
|
17
|
+
coordinates?: number[][][];
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* A parsed Tweet object.
|
|
22
|
+
*/
|
|
23
|
+
export interface Tweet {
|
|
24
|
+
hashtags: string[];
|
|
25
|
+
html?: string;
|
|
26
|
+
id?: string;
|
|
27
|
+
inReplyToStatus?: Tweet;
|
|
28
|
+
isQuoted?: boolean;
|
|
29
|
+
isPin?: boolean;
|
|
30
|
+
isReply?: boolean;
|
|
31
|
+
isRetweet?: boolean;
|
|
32
|
+
likes?: number;
|
|
33
|
+
permanentUrl?: string;
|
|
34
|
+
photos: string[];
|
|
35
|
+
place?: PlaceRaw;
|
|
36
|
+
quotedStatus?: Tweet;
|
|
37
|
+
replies?: number;
|
|
38
|
+
retweets?: number;
|
|
39
|
+
retweetedStatus?: Tweet;
|
|
40
|
+
text?: string;
|
|
41
|
+
timeParsed?: Date;
|
|
42
|
+
timestamp?: number;
|
|
43
|
+
urls: string[];
|
|
44
|
+
userId?: string;
|
|
45
|
+
username?: string;
|
|
46
|
+
videos: Video[];
|
|
47
|
+
sensitiveContent?: boolean;
|
|
48
|
+
}
|
|
49
|
+
export declare function fetchTweets(user: string, maxTweets: number, includeReplies: boolean, cursor: string | undefined, auth: TwitterGuestAuth): Promise<QueryTweetsResponse>;
|
|
50
|
+
export declare function getTweets(user: string, maxTweets: number, includeReplies: boolean, auth: TwitterGuestAuth): AsyncGenerator<Tweet>;
|
|
51
|
+
export declare function getTweet(id: string, includeReplies: boolean, auth: TwitterGuestAuth): Promise<Tweet | null>;
|
|
52
|
+
//# sourceMappingURL=tweets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tweets.d.ts","sourceRoot":"","sources":["../../src/tweets.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAE1C,OAAO,EAA4B,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAG3E,MAAM,WAAW,KAAK;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,QAAQ;IACvB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAA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EAAE,OAAO,EACvB,MAAM,EAAE,MAAM,GAAG,SAAS,EAC1B,IAAI,EAAE,gBAAgB,GACrB,OAAO,CAAC,mBAAmB,CAAC,CA8B9B;AAED,wBAAgB,SAAS,CACvB,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,MAAM,EACjB,cAAc,EAAE,OAAO,EACvB,IAAI,EAAE,gBAAgB,GACrB,cAAc,CAAC,KAAK,CAAC,CAIvB;AAED,wBAAsB,QAAQ,CAC5B,EAAE,EAAE,MAAM,EACV,cAAc,EAAE,OAAO,EACvB,IAAI,EAAE,gBAAgB,GACrB,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC,CAoBvB"}
|
package/package.json
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@the-convocation/twitter-scraper",
|
|
3
|
+
"version": "0.0.8",
|
|
4
|
+
"main": "dist/scraper.js",
|
|
5
|
+
"repository": "https://github.com/the-convocation/twitter-scraper.git",
|
|
6
|
+
"author": "karashiiro <49822414+karashiiro@users.noreply.github.com>",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"scripts": {
|
|
9
|
+
"build": "tsc",
|
|
10
|
+
"commit": "cz",
|
|
11
|
+
"docs:generate": "typedoc --entryPoints src --entryPointStrategy expand --exclude **/*.test.ts",
|
|
12
|
+
"docs:deploy": "yarn docs:generate && gh-pages -d docs",
|
|
13
|
+
"format": "prettier --write \\\"src/**/*.ts\\\" \\\"test/**/*.ts\\\"",
|
|
14
|
+
"prepare": "husky install",
|
|
15
|
+
"test": "jest"
|
|
16
|
+
},
|
|
17
|
+
"dependencies": {
|
|
18
|
+
"got": "^12.0.4",
|
|
19
|
+
"got-scraping": "^3.2.9",
|
|
20
|
+
"tslib": "^2.4.0"
|
|
21
|
+
},
|
|
22
|
+
"devDependencies": {
|
|
23
|
+
"@commitlint/cli": "^17.0.0",
|
|
24
|
+
"@commitlint/config-conventional": "^17.0.0",
|
|
25
|
+
"@types/jest": "^27.5.1",
|
|
26
|
+
"@typescript-eslint/eslint-plugin": "^5.24.0",
|
|
27
|
+
"@typescript-eslint/parser": "^5.24.0",
|
|
28
|
+
"cz-conventional-changelog": "^3.3.0",
|
|
29
|
+
"eslint": "^8.15.0",
|
|
30
|
+
"eslint-config-prettier": "^8.5.0",
|
|
31
|
+
"eslint-plugin-prettier": "^4.0.0",
|
|
32
|
+
"gh-pages": "^4.0.0",
|
|
33
|
+
"husky": "^8.0.1",
|
|
34
|
+
"jest": "^28.1.0",
|
|
35
|
+
"lint-staged": "^12.4.1",
|
|
36
|
+
"prettier": "^2.6.2",
|
|
37
|
+
"ts-jest": "^28.0.2",
|
|
38
|
+
"typedoc": "^0.22.15",
|
|
39
|
+
"typescript": "^4.6.4"
|
|
40
|
+
},
|
|
41
|
+
"config": {
|
|
42
|
+
"commitizen": {
|
|
43
|
+
"path": "./node_modules/cz-conventional-changelog"
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"lint-staged": {
|
|
47
|
+
"*.{js,ts}": [
|
|
48
|
+
"eslint --cache --fix",
|
|
49
|
+
"prettier --write"
|
|
50
|
+
]
|
|
51
|
+
}
|
|
52
|
+
}
|