cleanup code
This commit is contained in:
parent
12ad427baf
commit
e1f424b948
9 changed files with 138 additions and 95 deletions
|
@ -28,7 +28,7 @@ var ShortExtractor = &models.Extractor{
|
|||
IsRedirect: true,
|
||||
|
||||
Run: func(ctx *models.DownloadContext) (*models.ExtractorResponse, error) {
|
||||
client := util.GetHTTPSession(ctx.Extractor.CodeName)
|
||||
client := util.GetHTTPClient(ctx.Extractor.CodeName)
|
||||
req, err := http.NewRequest(http.MethodGet, ctx.MatchedContentURL, nil)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to create req: %w", err)
|
||||
|
@ -79,7 +79,7 @@ var Extractor = &models.Extractor{
|
|||
|
||||
func MediaListFromAPI(ctx *models.DownloadContext) ([]*models.Media, error) {
|
||||
var mediaList []*models.Media
|
||||
client := util.GetHTTPSession(ctx.Extractor.CodeName)
|
||||
client := util.GetHTTPClient(ctx.Extractor.CodeName)
|
||||
|
||||
tweetData, err := GetTweetAPI(
|
||||
client, ctx.MatchedContentID)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue