Visit Our UNIX and Linux User Community

Search Results

Search: Posts Made By: bob123
Forum: Programming 03-08-2020
2,913
Posted By bob123
0k got it this works just added a r after MYURL ...
0k got it this works just added a r after MYURL





MYURL=str(pattern.search(script.text).group(0))
MYURL=str.replace(MYURL, r'\u002D', '-')
print(MYURL)
thank you
Forum: Programming 03-08-2020
2,913
Posted By bob123
hi thanks for reply im using python...
hi thanks for reply


im using

python --version


Python 3.7.6 in ubuntu



and the same in windows Python 3.7.6



this did not replace
\u002D -...
Forum: Programming 03-08-2020
2,913
Posted By bob123
yes i want to enhance my python3 script to...
yes i want to

enhance my python3 script to do the replacement



from this
...
Forum: Programming 03-08-2020
2,913
Posted By bob123
hi thanks for reply that just prints the...
hi thanks for reply

that just prints the same url with no change



i need to replace \u002D with -
Forum: Programming 03-08-2020
2,913
Posted By bob123
Python3 replace string with another string
i have this python3 code

urls = ['https://example.com/']
for url in urls:
response = requests.get(url)
soup = BeautifulSoup(response.content, "html.parser")
pattern =...
Showing results 1 to 5 of 5

 

Featured Tech Videos

All times are GMT -4. The time now is 08:40 PM.
Unix & Linux Forums Content Copyright 1993-2020. All Rights Reserved.
Privacy Policy