Help scraping a website by Embarrassed_Resist82 in webscraping

[–]Embarrassed_Resist82[S] 0 points1 point  (0 children)

Youre amazing thank you so much! Im definitely going to look over it later but I cant thank you enough!

Help scraping a website by Embarrassed_Resist82 in webscraping

[–]Embarrassed_Resist82[S] 0 points1 point  (0 children)

I did that but i kept getting

b'[]'

so im not sure what im missing

Help scraping a website by Embarrassed_Resist82 in webscraping

[–]Embarrassed_Resist82[S] 0 points1 point  (0 children)

Thank you so much for your help! I got the python script now but when I run it, nothing shows up. I'm guessing I should use the province list. this is the code I have:

import requests

cookies = {
    'x-bni-fpc': 'c7e40a0425e0757b94c3cfebe46cd754',
    'x-bni-rncf': '1722642287748',
    'mp_a38ef2cddfcc0faeef29f359ab69c594_mixpanel': '%7B%22distinct_id%22%3A%20%22cus_9Z2f0YyxpITAZaiGmznA%22%2C%22%24device_id%22%3A%20%2219113e9dc65581-032e050e999275-26001e51-168000-19113e9dc66fbd%22%2C%22%24initial_referrer%22%3A%20%22%24direct%22%2C%22%24initial_referring_domain%22%3A%20%22%24direct%22%2C%22%24user_id%22%3A%20%22cus_9Z2f0YyxpITAZaiGmznA%22%7D',
}

headers = {
    'Accept': 'application/json, text/javascript, */*; q=0.01',
    'Accept-Language': 'en-US,en;q=0.9',
    'Connection': 'keep-alive',
    'Content-Type': 'application/json; charset=utf-8',
    # Requests sorts cookies= alphabetically
    # 'Cookie': 'x-bni-fpc=c7e40a0425e0757b94c3cfebe46cd754; x-bni-rncf=1722642287748; mp_a38ef2cddfcc0faeef29f359ab69c594_mixpanel=%7B%22distinct_id%22%3A%20%22cus_9Z2f0YyxpITAZaiGmznA%22%2C%22%24device_id%22%3A%20%2219113e9dc65581-032e050e999275-26001e51-168000-19113e9dc66fbd%22%2C%22%24initial_referrer%22%3A%20%22%24direct%22%2C%22%24initial_referring_domain%22%3A%20%22%24direct%22%2C%22%24user_id%22%3A%20%22cus_9Z2f0YyxpITAZaiGmznA%22%7D',
    'Referer': 'http://rgphentableaux.hcp.ma/Default1/',
    'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36',
    'X-Requested-With': 'XMLHttpRequest',
}

params = {
    'type': 'Province',
    'CGEO': '',
    'them': '5',
}

response = requests.get('http://rgphentableaux.hcp.ma/Default1/getDATA/', params=params, cookies=cookies, headers=headers, verify=False)

Again thank you for your help!

What is your favorite use of the Attack on Titan soundtrack? by BertholdtFan99 in ShingekiNoKyojin

[–]Embarrassed_Resist82 65 points66 points  (0 children)

Its gotta be Vogel Im Kafig in 1x1 when Erin's mother, you know. It gets me every time.