url

extract the domain name from the urls in another list

extract the domain name from the urls in another list Question: extract the domain name from the urls in another list. Also you need to extract the ending string which the url ends with. For example, https://www.example.com/market.php — In this example, domain name is www.example.com and the ending string is php Extract the domains and …

Total answers: 1

Python: request url and get contents

Python: request url and get contents Question: I am trying to get transaction history for the following address 9QgXqrgdbVU8KcpfskqJpAXKzbaYQJecgMAruSWoXDkM from the https://explorer.solana.com website. I have tried url="https://explorer.solana.com/address/9QgXqrgdbVU8KcpfskqJpAXKzbaYQJecgMAruSWoXDkM" output = requests.get(url).text print(output) However this gives me raw html output. How can I get the transactions from the url? Asked By: MathMan 99 || Source Answers: The …

Total answers: 1

Python regex to get the closest match without duplicated content

Python regex to get the closest match without duplicated content Question: What I need I have a list of img src link. Here is an example: https://studiocake.kiev.ua/wp-content/webpc-passthru.php?src=https://studiocake.kiev.ua/wp-content/uploads/photo_2020-12-27_12-18-00-2-333×444.jpg&nocache=1 https://studiocake.kiev.ua/wp-content/webpc-passthru.php?src=https://studiocake.kiev.ua/wp-content/uploads/IMG_4945-333×444.jpeg&nocache=1 https://studiocake.kiev.ua/wp-content/webpc-passthru.php?src=https://studiocake.kiev.ua/wp-content/uploads/tri-shokolada.png&nocache=1 I need get the following result: studiocake.kiev.ua/wp-content/uploads/photo_2020-12-27_12-18-00-2-333×444.jpg studiocake.kiev.ua/wp-content/uploads/IMG_4945-333×444.jpeg studiocake.kiev.ua/wp-content/uploads/tri-shokolada.png Problem I use the following regex: studiocake.kiev.ua.*(jpeg|png|jpg) But it doesn’t work the way I need. Instead of …

Total answers: 3

How to use two APIs to get the response of an endpoint once it processed?

How to use two APIs to get the response of an endpoint once it processed? Question: I have two APIs: triggerAPI and triggerAPIResult. When I hit the first one, it would trigger a process which could take a few minutes to return the response. The second API is used to check if the process is …

Total answers: 1

How to import data from a url to pandas dataframe?

How to import data from a url to pandas dataframe? Question: I’m trying to import data from the following url into pandas dataframe: https://www.asx.com.au/data/shortsell.txt I tried the following: url = ‘https://www.asx.com.au/data/shortsell.txt’ reader = pd.read_table(url, sep=’t’, skiprows=lambda x: x in [0, 1, 2, 3, 4, 5, 6, 7], header=None, names=[ ‘ASX’, ‘Company Name’, ‘Product/’, ‘Reported Gross’, …

Total answers: 1

Regex to match a url/link with line breaks

Regex to match a url/link with line breaks Question: I want match url from references.But some url has line brakes in it. Example text = Yale Project on Climate Change Communication. New Haven, CT: xxx University and George Mason University; 2015. p. 1–62. Available from: https://example.xxx.edu/wp-content/ uploads/2015/04/Global-Warming-CCAM-March-2015.pdf. want to match: https://example.xxx.edu/wp-content/uploads/2015/04/Global-Warming-CCAM-March-2015.pdf Asked By: Siam Sadman …

Total answers: 1

How to convert json from url into pandas dataframe?

How to convert json from url into pandas dataframe? Question: with this code: import pandas as pd import requests import json url = ‘https://www.loves.com/api/sitecore/StoreSearch/SearchStores’ #get the data from url response = requests.get(url).json() df = pd.read_json(url) df1 = pd.json_normalize(response) both DFs return this: This is what the response looks like How to get normal pandas dataframe? …

Total answers: 2

How to add a URL into a dataFrame

How to add a URL into a dataFrame Question: I’m trying to add a specific URL into a dataFrame in order to export the information into a csv. Every row of this csv has a specific ID added at the end of the URL attached The URL example would be like this: https://example.navigator.com/index.php?pagina=demoData;ID The problem …

Total answers: 1

Changing pickup and dropoff dates in turo using playwright

Changing pickup and dropoff dates in turo using playwright Question: Hi I’m trying to scrape some data from this site https://turo.com/us/en/car-rental/united-states/austin-tx/tesla/model-s/1733237?endDate=11%2F09%2F2022&endTime=11%3A00&startDate=11%2F05%2F2022&startTime=11%3A00 using playwright but I’m struggling with changing the date and time. At first I tried to make my bot click on the date and time boxes but I kept running into issues so I …

Total answers: 1