Skip to content

Commit

Permalink
Update rajira_blog.py
Browse files Browse the repository at this point in the history
  • Loading branch information
limangox authored May 13, 2024
1 parent 8bd8278 commit 32964da
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions script/rajira_blog.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@


def rajira(url):
cookies = {
'AMCV_F2EE53755E31533C0A495F9D%40AdobeOrg': '179643557%7CMCMID%7C18818877612564026475558796745638989303%7CMCAID%7CNONE%7CMCOPTOUT-1712496083s%7CNONE%7CvVersion%7C5.5.0',
's_cc': 'true',
's_sq': '%5B%5BB%5D%5D',
's_ips_orgc': '911',
's_tp_orgc': '17639',
's_ppv_orgc': 'p%253Aradirer%253Ars%253A88W859PYQ9%253Ablog%253Abl%253Ap30Z7R1ZY2%253Abp%253Apq7Ko3NGGq%253Aindex%2C5%2C5%2C911%2C1%2C19',
}

headers = {
'accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7',
'accept-language': 'zh-CN,zh;q=0.9,ja;q=0.8,ko;q=0.7,en;q=0.6,tr;q=0.5,ru;q=0.4',
Expand All @@ -14,10 +23,11 @@ def rajira(url):

resp = requests.get(
url,
headers=headers
headers=headers,
cookies=cookies
)

if resp.status_code == 200:
if resp.status_code == 200 or resp.status_code == 304:
resp_text = resp.text
title = re.findall('<meta name="og:title" property="og:title" content="(.*?)">', resp_text)[0]
json_file = \
Expand Down

0 comments on commit 32964da

Please sign in to comment.